All the Fake Data for All Your Real Needs 🙂
Create massive amounts of fake data in the browser and NodeJS. Tree Shakeable & Fully Typed.
✅ 203 Functions
✅ Tree Shakable
✅ Fully Typed
✅ Factory Functions
✅ Entity Functions
✅ Single and Array Result
🤓 Learn about it on the docs site
npm i @ngneat/falso
yarn add @ngneat/falso
import { randEmail, randFullName } from '@ngneat/falso';
const user = { email: randEmail(), name: randFullName() };
const emails = randEmail({ length: 10 });
You can specify the length of elements you want to generate. Below is an example of generating 10 emails with length equal or smaller than 20 characters.
const emails = randEmail({ length: 10, maxCharCount: 20 });
You can set your own seed if you want consistent results:
import { rand, seed } from '@ngneat/falso';
seed('some-constant-seed');
// Always returns 2
rand([1, 2, 3, 4, 5]);
// Reset random seed
seed();
- Go over the steps in this guide
- Add a new falso
- Use
npm run c
and choose the right answers