<commit_before># Describing interfaces in directory

## Interface `SourceBrowser`
Describes an object capable of browsing a source code.

    interface SourceBrowser = {
      at: function(rs: number, re: number, cs: number, ce: number) -> string;
    }

**Member `at`** is a function:

1. `rs`: Row start.
2. `re`: Row end.
3. `cs`: Column start.
4. `ce`: Column end.
5. `return`: Returns the piece of code requested. It it spans on more lines, those lines will be collapsed into a single line without adding anymore character.

## Regex handling
Interfaces used mostly in `regex.js`.

### Interface `RegexHandler`
Describes an object providing all necessary API for handling a specific regex.

    interface RegexHandler = function(matches: *string | null) -> object | null

Where:

1. `matches`: The result of invoking `[object].exec([string])` using a regex and a string to match.
2. `return`: Returns an object indexing every useful capturing group like: `{ group1: '...', group2: '...', ... }`. `null` will be returned in case `matches` is `null` too.

### Interface `RegexUnit`
Describes an object providing all necessary API to give information for a specific regex and routines to handle that regex.

    interface RegexUnit = {
      regex: string;
      handler: RegexHandler;
    }

Where:

1. `regex`: Is the regex string (not the `RegExp` object).
2. 'handler': A `[RegexHandler]` for `regex`.<commit_msg>Update jsint.md<commit_after># Describing interfaces in directory

## Interface `SourceBrowser`
Describes an object capable of browsing a source code.

    interface SourceBrowser = {
      at: function(rs: number, re: number, cs: number, ce: number) -> string;
    }

**Member `at`** is a function:

1. `rs`: Row start.
2. `re`: Row end.
3. `cs`: Column start.
4. `ce`: Column end.
5. `return`: Returns the piece of code requested. It it spans on more lines, those lines will be collapsed into a single line without adding anymore character.

## Regex handling
Interfaces used mostly in `regex.js`.

### Interface `RegexHandler`
Describes an object providing all necessary API for handling a specific regex.

    interface RegexHandler = function(matches: *string | null) -> object | null

Where:

1. `matches`: The result of invoking `[object].exec([string])` using a regex and a string to match.
2. `return`: Returns an object indexing every useful capturing group; with the peculiarity that property `ALL` will always be available providing the whole match (`[object].exec([string])[0]`). Such object looks like: `{ ALL: '...', group1: '...', group2: '...', ... }`. Also be aware that `null` will be returned in case `matches` is `null` too.

### Interface `RegexUnit`
Describes an object providing all necessary API to give information for a specific regex and routines to handle that regex.

    interface RegexUnit = {
      regex: string;
      handler: RegexHandler;
    }

Where:

1. `regex`: Is the regex string (not the `RegExp` object).
2. 'handler': A `[RegexHandler]` for `regex`.
{'fraction_non_alphanumeric': 0.11645653616456536, 'fraction_numerical': 0.007631055076310551, 'mean_word_length': 3.847266881028939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6146258', 'n_tokens_mistral': 883, 'n_tokens_neox': 837, 'n_words': 399}