aboutsummaryrefslogtreecommitdiff
path: root/docs/guide/usage.md
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-09-18 05:52:42 +0200
committerGitHub <[email protected]>2023-09-18 05:52:42 +0200
commitd6a4f8c2ddf9e957e875bc3fab77e496104d1320 (patch)
tree8c87a5d2baf4dfad8d96da7a4823adaf8bd005ee /docs/guide/usage.md
parentf40e217c6275ab555ecbe3ca0046526e44b31263 (diff)
downloadfaker-d6a4f8c2ddf9e957e875bc3fab77e496104d1320.tar.xz
faker-d6a4f8c2ddf9e957e875bc3fab77e496104d1320.zip
feat: split SimpleFaker class from Faker (#2369)
Diffstat (limited to 'docs/guide/usage.md')
-rw-r--r--docs/guide/usage.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/guide/usage.md b/docs/guide/usage.md
index 0cdfb9c4..d7da0dfa 100644
--- a/docs/guide/usage.md
+++ b/docs/guide/usage.md
@@ -127,6 +127,21 @@ or alternatively you can set a default reference date for all these methods:
faker.setDefaultRefDate('2023-01-01T00:00:00.000Z');
```
+## Simple data generation
+
+Faker provides a `simpleFaker` that can be used to generate data that are not based on any locales like numbers and strings.
+Also **helpers** like `arrayElement` or `multiple` are available.
+
+This is useful if you just want to generate e.g. `uuid`s for your test environment, but don't want/need to initiate/load a full Faker instance, which would include at least 500KB of locale data.
+
+```ts
+import { simpleFaker } from '@faker-js/faker';
+
+const uuid = simpleFaker.string.uuid();
+```
+
+See more about `SimpleFaker` in the [API docs](/api/simpleFaker).
+
## Create complex objects
Faker mostly generates values for primitives.