Skip to content

ngneat/falso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d76fbaa Β· Jan 16, 2025
Jan 8, 2025
Feb 5, 2022
Jan 10, 2022
Jan 11, 2025
Jan 16, 2025
Feb 5, 2022
Sep 23, 2023
Jan 17, 2022
Jan 20, 2022
Feb 21, 2024
Jul 18, 2023
Jul 18, 2023
Aug 25, 2024
Aug 25, 2024
Feb 21, 2024
Jan 8, 2022
Jan 9, 2022
Feb 3, 2022
Jan 9, 2022
Jan 8, 2025
Jan 7, 2023
Jan 9, 2022
Jan 19, 2022
Jan 8, 2025
Jul 18, 2023
Jul 18, 2023
Jan 14, 2022
Jan 9, 2022
Jan 11, 2025
Feb 21, 2024
Jan 16, 2025
Jan 16, 2025
Jan 17, 2022

Repository files navigation

All the Fake Data for All Your Real Needs πŸ™‚

Create massive amounts of fake data in the browser and NodeJS. Tree Shakeable & Fully Typed.


@ngneat/falso commitizen PRs coc-badge semantic-release styled with prettier

βœ…  205 Functions
βœ…  Tree Shakable
βœ…  Fully Typed
βœ…  Factory Functions
βœ…  Entity Functions
βœ…  Single and Array Result

πŸ€“ Learn about it on the docs site

Sponsoring ngneat

Sponsorships aid in the continued development and maintenance of ngneat libraries. Consider asking your company to sponsor ngneat as its core to their business and application development.

Gold Sponsors

Elevate your support by becoming a Gold Sponsor and have your logo prominently featured on our README in the top 5 repositories.

Silver Sponsors

Boost your backing by becoming a Gold Sponsor and enjoy the spotlight with your logo prominently showcased in the top 3 repositories on our README.

Bronze Sponsors

House of Angular

Become a bronze sponsor and get your logo on our README on GitHub.

StackBlitz

Open in StackBlitz

Installation

npm i @ngneat/falso
yarn add @ngneat/falso

Usage

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 });

Setting a Randomness Seed

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();

Contribute

  • Go over the steps in this guide
  • Add a new falso

contribute

  • Use npm run c and choose the right answers
Icons made by Freepik from www.flaticon.com

Contributors

Thanks to awesome contributors! ❀️

Made with contrib.rocks.