DEV Community

Shahar Kazaz
Shahar Kazaz

Posted on

Thank you Faker. Now it’s Time to Move On.

TL;DR — Falso is a modern, tree-shakeable, well-documented replacement for Faker.js

You probably know what happened to Faker.js around two weeks ago.

In collaboration with Netanel Basal, I created a new mock data generator lib to provide a quick, suitable replacement for those relying on Faker (including us).

Meet Falso 🎩

✅ 160+ Functions ( at the time of writing)
✅ Tree Shakable
✅ Fully Typed
✅ Entity Functions
✅ Well documented with live previews
✅ Single and Array Results

There was a lot of community effort put into building this library. In just two weeks, we accomplished:

✨ A whopping 1.6k Github Stars
💪 59 Merged pull requests
🎁 58 New Features

I want to thank everyone who took part in this, you rock!

Give Falso a try and let me know what you think 🌟

GitHub logo ngneat / falso

All the Fake Data for All Your Real Needs 🙂

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

 164 Functions
 Tree Shakable
 Fully Typed
 Entity Functions
 Single and Array Result

🤓 Learn about it on the docs site
🔥 Run it on 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 });
Enter fullscreen mode Exit fullscreen mode

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]);
Enter fullscreen mode Exit fullscreen mode

See the docs:

The [Falso docs](https://ngneat.github.io/falso/) and live preview

We’re just getting started.

What’s Next?

🌐 Locale support
💪 More Generators
🎯 Improve data accuracy

You are welcome to contribute! Let us build the next generation of mock data together!

For those looking to contribute for the first time to an open-source, Falso is an excellent choice!

Discussion (0)