> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mockwise.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Numbers & Strings

## `randomDigit`

Generates a random integer from 0 until 9.

```json theme={null}
{"type": "randomDigit"}

// an integer between 0 and 9
```

## `randomDigitNot`

Generates a random integer from 0 until 9, excluding a given number.

```json theme={null}
{"type": "randomDigitNot", "params":[2]}

// 0, 1, 3, 4, 5, 6, 7, 8 or 9
```

## `randomDigitNotNull`

Generates a random integer from 1 until 9.

```json theme={null}
{"type": "randomDigitNotNull"}

// an integer between 1 and 9
```

## `randomNumber`

Generates a random integer, containing between 0 and `nbDigits` amount of digits. When the `strict` parameter
is `true`, it will only return integers with \$nbDigits amount of digits.

```json theme={null}
{"type": "randomNumber", "params":[5, false]}

// 123, 43, 19238, 5, or 1203

{"type": "randomNumber", "params":[5, true]}

// 12643, 42931, or 32919
```

## `randomFloat`

Generates a random float. Optionally it's possible to specify the amount of decimals.
The second and third parameters optionally specify a lower and upper bound respectively.

```json theme={null}
{"type": "randomFloat"}

// 12.9830, 2193.1232312, 102.12

{"type": "randomFloat", "params":[2]}

// 43.23, 1203.49, 3428.93

{"type": "randomFloat", "params":[1, 20, 30]}

// 21.7, 27.2, 28.1
```

## `numberBetween`

Generates a random integer between `min` and `max`. By default, an integer is generated between `0`
and `2,147,483,647` (32-bit integer).

```json theme={null}
{"type": "numberBetween"}

// 120378987, 182, 102310983

{"type": "numberBetween", "params":[0, 100]}

// 32, 87, 91, 13, 75
```

## `randomLetter`

Generates a random character from the alphabet.

```json theme={null}
{"type": "randomLetter"}

// 'h', 'i', 'q'
```

## `randomElements`

Returns `count` amount of random element from the given array, traversable, or enum. By default, the `count` parameter is set to 1, when `null` a random number of elements is returned.

```json theme={null}
{"type": "randomElements", "params": [['a', 'b', 'c', 'd', 'e']]}

// ['c']

{"type": "randomElements", "params": [['a', 'b', 'c', 'd', 'e'], null]);

// ['c', 'a', 'e']
```

## `randomElement`

Returns a random element from the given array, traversable, or enum.

```json theme={null}
{"type": "randomElement", "params": [['a', 'b', 'c', 'd', 'e']]}

// 'c'
```

## `randomKey`

Returns a random key from the given array.

```json theme={null}
{"type": "randomKey", "params":[{'a': 1, 'b': 2, 'c': 3}]}

// 'b'
```

## `shuffle`

Returns a shuffled version of either an array or string.

```json theme={null}
{"type": "shuffle", "params": ['hello-world']}

// 'lrhoodl-ewl'

{"type": "shuffle", "params": [[1, 2, 3]]}

// [3, 1, 2]
```

## `numerify`

Generate a string where all `#` characters are replaced by digits between 0 and 9. By default, `###` is used as input.

```json theme={null}
{"type": "numerify"}

// '912', '271', '109', '674'

{"type": "numerify", "params": ['user-####']}

// 'user-4928', 'user-3427', 'user-1280'
```

## `lexify`

Generate a string where all `?` characters are replaces with a random letter from the Latin alphabet. By default, `????`
is used as input.

```json theme={null}
{"type": "lexify"}

// 'sakh', 'qwei', 'adsj'

{"type": "lexify", "params": ['id-????']}

// 'id-xoqe', 'id-pqpq', 'id-zpeu'
```

## `bothify`

Generate a string where `?` characters are replaced with a random letter, `#` characters are replaced with a random
digit between 0 and 9, and `*` characters are replaced with either a random letter or a random digit. By default, `## ??` is used as input.

```json theme={null}
{"type": "bothify"}

// '46 hd', '19 ls', '75 pw'

{"type": "bothify", "params": ['?????-#####']}

// 'lsadj-10298', 'poiem-98342', 'lcnsz-42938'
```

## `asciify`

Generate a string where `*` characters are replaced with a random character from the ASCII table. By default, `****` is
used as input.

```json theme={null}
{"type": "asciify"}

// '%Y+!', '{<"B', 'kF^a'

{"type": "asciify", "params": ['user-****']};

// 'user-ntwx', 'user-PK`A', 'user-n`,X'
```

## `regexify`

Generate a random string based on a regex. By default, an empty string is used as input.

```json theme={null}
{"type": "regexify"}

// ''

{"type": "regexify", "params": ['[A-Z]{5}[0-4]{3}']};

// 'DRSQX201', 'FUDPA404', 'CQVIU411'
```
