SpoofSettings Overview
SpoofSettings is the single optional argument of Forger.create and Forger.createWith. It tunes how numbers, strings, dates, and arrays are generated. Anything omitted falls back to the default.
Usage
Settings are merged with the defaults per call, so a settings object with a single key is perfectly fine — the rest keeps default behavior. The object may be inline, a variable, or the result of a function call.
Full reference
Option | Type | Default | Affects | Details |
|---|---|---|---|---|
|
|
| Lower bound of numbers, inclusive | |
|
|
| Upper bound of numbers, inclusive | |
|
|
| Fractional instead of integer numbers | |
|
|
| Length of generated strings | |
|
|
| Digits in the string charset | |
|
|
| Lowercase letters in the charset | |
|
|
| Uppercase letters in the charset | |
|
|
| Special characters in the charset | |
|
|
| Lower bound of dates, inclusive | |
|
|
| Upper bound of dates, inclusive | |
|
|
| Length of generated arrays |
Scope
Settings apply per call and flow into every nested level — a numberMax: 10 limits all numbers in the whole object graph, and arrayLength sizes arrays at every depth.
Booleans, enums, literal unions, tuples, and circular depth are not affected by settings — their behavior is defined by the type itself.
Type definition
The class behind the settings with all defaults spelled out is documented in API Reference: SpoofSettings.