Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@faker-js/faker

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@faker-js/faker

Generate massive amounts of fake contextual data

  • 9.0.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.3M
decreased by-2.23%
Maintainers
0
Weekly downloads
 
Created

What is @faker-js/faker?

The @faker-js/faker package is a powerful tool for generating massive amounts of fake (but realistic) data for various purposes such as testing, bootstrapping databases, and creating rich prototypes. It can create data for names, addresses, phone numbers, and much more.

What are @faker-js/faker's main functionalities?

Basic random data generation

Generate random names, addresses, and other basic personal information.

const { faker } = require('@faker-js/faker');
console.log(faker.name.findName()); // Generates a random name

Localization

Support for localized data, allowing generation of data that is locale-specific.

const { faker } = require('@faker-js/faker');
faker.locale = 'de';
console.log(faker.name.findName()); // Generates a random name with German locale

Random numbers

Create random numbers, including options for specifying ranges and precision.

const { faker } = require('@faker-js/faker');
console.log(faker.datatype.number()); // Generates a random number

Date and time

Generate random dates and times, with the ability to specify past or future dates.

const { faker } = require('@faker-js/faker');
console.log(faker.date.future()); // Generates a random future date

Internet-related data

Create fake internet data such as email addresses, domain names, and URLs.

const { faker } = require('@faker-js/faker');
console.log(faker.internet.email()); // Generates a random email address

Commerce data

Generate commerce-related data like product names, prices, and categories.

const { faker } = require('@faker-js/faker');
console.log(faker.commerce.productName()); // Generates a random product name

Images

Create URLs for random placeholder images.

const { faker } = require('@faker-js/faker');
console.log(faker.image.imageUrl()); // Generates a random image URL

Other packages similar to @faker-js/faker

Keywords

FAQs

Package last updated on 23 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc