
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
@ngneat/falso
Advanced tools
@ngneat/falso is a JavaScript library that provides a wide range of fake data generators for various types of data. It is useful for testing, prototyping, and development purposes where you need to generate realistic but fake data.
Generate Fake Names
This feature allows you to generate random first and last names, which can be useful for populating user profiles or testing forms.
const { randFirstName, randLastName } = require('@ngneat/falso');
console.log(randFirstName()); // e.g., 'John'
console.log(randLastName()); // e.g., 'Doe'
Generate Fake Addresses
This feature allows you to generate random street addresses, cities, and countries, which can be useful for testing location-based applications.
const { randStreetAddress, randCity, randCountry } = require('@ngneat/falso');
console.log(randStreetAddress()); // e.g., '123 Main St'
console.log(randCity()); // e.g., 'New York'
console.log(randCountry()); // e.g., 'USA'
Generate Fake Dates
This feature allows you to generate random past and future dates, which can be useful for testing date-based functionalities.
const { randPastDate, randFutureDate } = require('@ngneat/falso');
console.log(randPastDate()); // e.g., '2020-01-01T00:00:00.000Z'
console.log(randFutureDate()); // e.g., '2025-01-01T00:00:00.000Z'
Generate Fake Emails
This feature allows you to generate random email addresses, which can be useful for testing email-related functionalities.
const { randEmail } = require('@ngneat/falso');
console.log(randEmail()); // e.g., 'john.doe@example.com'
Generate Fake Phone Numbers
This feature allows you to generate random phone numbers, which can be useful for testing contact forms and phone number validation.
const { randPhoneNumber } = require('@ngneat/falso');
console.log(randPhoneNumber()); // e.g., '(123) 456-7890'
Faker.js is a popular library for generating fake data. It offers a wide range of data types similar to @ngneat/falso, including names, addresses, dates, emails, and phone numbers. However, Faker.js has a larger community and more extensive documentation.
Chance.js is another library for generating random data. It provides a variety of data types and is highly customizable. Compared to @ngneat/falso, Chance.js offers more flexibility in generating complex data structures.
Casual is a library for generating random data with a focus on simplicity and ease of use. It offers a range of data types similar to @ngneat/falso but with a simpler API. Casual is a good choice for quick and easy data generation.
All the Fake Data for All Your Real Needs 🙂
Create massive amounts of fake data in the browser and NodeJS. Tree Shakeable & Fully Typed.
✅ 201 Functions
✅ Tree Shakable
✅ Fully Typed
✅ Factory Functions
✅ Entity Functions
✅ Single and Array Result
🤓 Learn about it on the docs site
🔥 Run it on Stackblitz
🎁 Generate data using Fako
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 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();
npm run c
and choose the right answersFAQs
All the Fake Data for All Your Real Needs
The npm package @ngneat/falso receives a total of 366,031 weekly downloads. As such, @ngneat/falso popularity was classified as popular.
We found that @ngneat/falso demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.