<commit_before>JSON Schema $Ref Parser API
==========================

Things to Know
---------------------
- [Class methods vs. Instance methods](#class-methods-vs-instance-methods)
- [Callbacks vs. Promises](#callbacks-vs-promises)
- [Circular references](#circular-refs)


Classes & Methods
---------------------

#### [`$RefParser`](ref-parser.md)
- [`schema`](ref-parser.md#schema)
- [`$refs`](ref-parser.md#refs)
- [`dereference()`](ref-parser.md#dereferenceschema-options-callback)
- [`bundle()`](ref-parser.md#bundleschema-options-callback)
- [`parse()`](ref-parser.md#parseschema-options-callback)
- [`resolve()`](ref-parser.md#resolveschema-options-callback)

#### [`$Refs`](refs.md)
- [`circular`](refs.md#circular)
- [`paths()`](refs.md#pathstypes)
- [`values()`](refs.md#valuestypes)
- [`exists()`](refs.md#existsref)
- [`get()`](refs.md#getref-options)
- [`set()`](refs.md#setref-value-options)

#### [`YAML`](yaml.md)
- [`parse()`](yaml.md#parsetext)
- [`stringify()`](yaml.md#stringifyvalue)

#### [`Options`](options.md)


### Class methods vs. Instance methods
All of JSON Schema $Ref Parser's methods are available as static (class) methods, and as instance methods.  The static methods simply create a new [`$RefParser`](ref-parser.md) instance and then call the corresponding instance method.  Thus, the following line...

```javascript
$RefParser.bundle("my-schema.json");
```

... is the same as this:

```javascript
var parser = new $RefParser();
parser.bundle("my-schema.json");
```

The difference is that in the second example you now have a reference to `parser`, which means you can access the results ([`parser.schema`](ref-parser.md#schema) and [`parser.$refs`](ref-parser.md#refs)) anytime you want, rather than just in the callback function.<commit_msg>Made the TOC links more visible<commit_after>JSON Schema $Ref Parser API
==========================

Things to Know
---------------------
- [Class methods vs. Instance methods](#class-methods-vs-instance-methods)
- [Callbacks vs. Promises](#callbacks-vs-promises)
- [Circular references](#circular-refs)


Classes & Methods
---------------------

#### [The `$RefParser` class](ref-parser.md)
- [`schema` property](ref-parser.md#schema)
- [`$refs` property](ref-parser.md#refs)
- [`dereference()` method](ref-parser.md#dereferenceschema-options-callback)
- [`bundle()` method](ref-parser.md#bundleschema-options-callback)
- [`parse()` method](ref-parser.md#parseschema-options-callback)
- [`resolve()` method](ref-parser.md#resolveschema-options-callback)

#### [The `$Refs` class](refs.md)
- [`circular` property](refs.md#circular)
- [`paths()` method](refs.md#pathstypes)
- [`values()` method](refs.md#valuestypes)
- [`exists()` method](refs.md#existsref)
- [`get()` method](refs.md#getref-options)
- [`set()` method](refs.md#setref-value-options)

#### [The `YAML` object](yaml.md)
- [`parse()` method](yaml.md#parsetext)
- [`stringify()` method](yaml.md#stringifyvalue)

#### [The `Options` object](options.md)


### Class methods vs. Instance methods
All of JSON Schema $Ref Parser's methods are available as static (class) methods, and as instance methods.  The static methods simply create a new [`$RefParser`](ref-parser.md) instance and then call the corresponding instance method.  Thus, the following line...

```javascript
$RefParser.bundle("my-schema.json");
```

... is the same as this:

```javascript
var parser = new $RefParser();
parser.bundle("my-schema.json");
```

The difference is that in the second example you now have a reference to `parser`, which means you can access the results ([`parser.schema`](ref-parser.md#schema) and [`parser.$refs`](ref-parser.md#refs)) anytime you want, rather than just in the callback function.
{'fraction_non_alphanumeric': 0.21573875802997858, 'fraction_numerical': 0.0, 'mean_word_length': 4.9506369426751595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '862319', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1143, 'n_words': 282}