<commit_before>Asserts that the subject is an instance of a given type.

This assertion make use of the type system in Unexpected. That means
you can assertion that a value is an instance of a type specified by
it's name.

For more information abort the type system see: [Types](/types/)

```javascript
expect(true, 'to be a', 'boolean');
expect(5, 'to be a', 'number');
expect('abc', 'to be a', 'string');
expect(expect, 'to be a', 'function');
expect({foo: 123}, 'to be an', 'object');
expect([123], 'to be an', 'array');
expect(/regex/, 'to be a', 'regexp');
expect(/regex/, 'to be a', 'regex');
expect(/regex/, 'to be a', 'regular expression');
expect(new Error(), 'to be an', 'Error');
```

The assertions also respect the inheritance chain:

```javascript
expect(expect, 'to be a', 'function');
expect(expect, 'to be an', 'object');
```

Aliases are provided for common types:

```javascript
expect(true, 'to be a boolean');
expect(5, 'to be a number');
expect('abc', 'to be a string');
expect(expect, 'to be a function');
expect({foo: 123}, 'to be an object');<commit_msg>Fixed dead link on the documentation site<commit_after>Asserts that the subject is an instance of a given type.

This assertion make use of the type system in Unexpected. That means
you can assertion that a value is an instance of a type specified by
it's name.

For more information abort the type system see: [Types](/api/addType/)

```javascript
expect(true, 'to be a', 'boolean');
expect(5, 'to be a', 'number');
expect('abc', 'to be a', 'string');
expect(expect, 'to be a', 'function');
expect({foo: 123}, 'to be an', 'object');
expect([123], 'to be an', 'array');
expect(/regex/, 'to be a', 'regexp');
expect(/regex/, 'to be a', 'regex');
expect(/regex/, 'to be a', 'regular expression');
expect(new Error(), 'to be an', 'Error');
```

The assertions also respect the inheritance chain:

```javascript
expect(expect, 'to be a', 'function');
expect(expect, 'to be an', 'object');
```

Aliases are provided for common types:

```javascript
expect(true, 'to be a boolean');
expect(5, 'to be a number');
expect('abc', 'to be a string');
expect(expect, 'to be a function');
expect({foo: 123}, 'to be an object');
{'fraction_non_alphanumeric': 0.1729014598540146, 'fraction_numerical': 0.010036496350364963, 'mean_word_length': 5.230113636363637, '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': '3855357', 'n_tokens_mistral': 702, 'n_tokens_neox': 665, 'n_words': 311}