Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Generate fake data.
An alternative to faker.js but with cjs or esm syntax
npm i minifaker
faker.js is too big and there is no tree shaking. https://github.com/Marak/faker.js/issues/785
Too much work to get the pull request denied. Instead, I will be adding new functions here from time to time.
I will deprecate functions with better alternatives.
use npm i nanoid
to generate string ID
use npm i lorem-ipsum
to generate lorem words
I've notice that faker locales have duplicate words :S.
I will remove the duplicates when importing locale files to reduce size as much as possible.
// You can either import minifaker completely or import the functions you need
import minifaker, { arrayElement } from 'minifaker'
// const minifaker = require('minifaker')
minifaker.number()
arrayElement(['one', 'two', 'three'])
import minifaker, { cityName } from 'minifaker'
import 'minifaker/dist/locales/en' // first import is set a default locale
import 'minifaker/dist/locales/fr'
minifaker.firstName({ gender: 'female' }) // female name in english
cityName({ locale: 'fr' }) // french city name
Function | Locales | Faker.js |
---|---|---|
arrayElement | n/a | arrayElement |
number | n/a | number,float |
boolean | n/a | boolean |
use nanoid | n/a | uuid |
firstName | en,fr | firstName |
phoneNumber | en,fr,fr_CA | phoneNumber |
cityName | en,fr | cityName |
cityPrefix | en | cityPrefix |
citySufix | en | citySufix |
imageUrlFromPlaceIMG | n/a | imageUrl |
imageUrlFromPlaceholder | n/a | imageUrl |
use lorem-ipsum.js | n/a | lorem |
objectElement | n/a | objectElement |
array | n/a | n/a |
FAQs
lightweight faker.js
The npm package minifaker receives a total of 24,425 weekly downloads. As such, minifaker popularity was classified as popular.
We found that minifaker demonstrated a not healthy version release cadence and project activity because the last version was released 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.