A JavaScript library built on top of the Faker.JS library. It generates massive amounts of fake data in the browser and node.js.

Overview

GitHub Workflow Status npm NPM GitHub issues GitHub deployments Coverage Status npm

Blaver - generate massive amounts of fake data in the browser and node.js

Blaver is a JavaScript library built on top of the Faker.JS library. It generates massive amounts of fake data in the browser and node.js.

Fake data is useful when building and testing our application. Blaver can generate fake data for various areas, including address, commerce, company, date, finance, image, random, or name.

What happened to the original faker.js?

This project was originally created and hosted at https://github.com/marak/Faker.js/ - however around 4th Jan, 2022 - the author decided to delete the repository along with the code, for unknown reasons.

Blaver is a fork of the original Faker.js library. The original library was created by Marak Squires in 2011. Blaver aims to maintain the original library's functionality and add new features.

You can also access unofficial Faker.js documentation at https://fakerjsdocs.netlify.com/

Installation

Via CDN

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/blaver.min.js"></script>

Via NPM

npm i blaver

Usage

Browser

<script>
  var randomName = blaver.name.findName(); // Caitlyn Kerluke
  var randomEmail = blaver.internet.email(); // Rusty@arne.info
  var randomCard = blaver.helpers.createCard(); // random contact card containing many properties
</script>

Node.js

var blaver = require('blaver');

var randomName = blaver.name.findName(); // Rowan Nikolaus
var randomEmail = blaver.internet.email(); // Kassandra.Haley@erich.biz
var randomCard = blaver.helpers.createCard(); // random contact card containing many properties

API

JSDoc API Browser

You can browse all API methods by going to the JSDoc API Browser.

API Methods

  • address
    • zipCode
    • zipCodeByState
    • city
    • cityPrefix
    • citySuffix
    • cityName
    • streetName
    • streetAddress
    • streetSuffix
    • streetPrefix
    • secondaryAddress
    • county
    • country
    • countryCode
    • state
    • stateAbbr
    • latitude
    • longitude
    • direction
    • cardinalDirection
    • ordinalDirection
    • nearbyGPSCoordinate
    • timeZone
  • animal
    • dog
    • cat
    • snake
    • bear
    • lion
    • cetacean
    • horse
    • bird
    • cow
    • fish
    • crocodilia
    • insect
    • rabbit
    • type
  • commerce
    • color
    • department
    • productName
    • price
    • productAdjective
    • productMaterial
    • product
    • productDescription
  • company
    • suffixes
    • companyName
    • companySuffix
    • catchPhrase
    • bs
    • catchPhraseAdjective
    • catchPhraseDescriptor
    • catchPhraseNoun
    • bsAdjective
    • bsBuzz
    • bsNoun
  • database
    • column
    • type
    • collation
    • engine
  • datatype
    • number
    • float
    • datetime
    • string
    • uuid
    • boolean
    • hexaDecimal
    • json
    • array
    • bigInt
  • date
    • past
    • future
    • between
    • betweens
    • recent
    • soon
    • month
    • weekday
  • fake
  • finance
    • account
    • accountName
    • routingNumber
    • mask
    • amount
    • transactionType
    • currencyCode
    • currencyName
    • currencySymbol
    • bitcoinAddress
    • litecoinAddress
    • creditCardNumber
    • creditCardCVV
    • ethereumAddress
    • iban
    • bic
    • transactionDescription
  • git
    • branch
    • commitEntry
    • commitMessage
    • commitSha
    • shortSha
  • hacker
    • abbreviation
    • adjective
    • noun
    • verb
    • ingverb
    • phrase
  • helpers
    • randomize
    • slugify
    • replaceSymbolWithNumber
    • replaceSymbols
    • replaceCreditCardSymbols
    • repeatString
    • regexpStyleStringParse
    • shuffle
    • uniqueArray
    • mustache
    • createCard
    • contextualCard
    • userCard
    • createTransaction
  • image
    • image
    • avatar
    • imageUrl
    • abstract
    • animals
    • business
    • cats
    • city
    • food
    • nightlife
    • fashion
    • people
    • nature
    • sports
    • technics
    • transport
    • dataUri
    • lorempixel
    • unsplash
    • lorempicsum
  • internet
    • avatar
    • email
    • exampleEmail
    • userName
    • protocol
    • httpMethod
    • url
    • domainName
    • domainSuffix
    • domainWord
    • ip
    • ipv6
    • port
    • userAgent
    • color
    • mac
    • password
  • lorem
    • word
    • words
    • sentence
    • slug
    • sentences
    • paragraph
    • paragraphs
    • text
    • lines
  • mersenne
    • rand
    • seed
    • seed_array
  • music
    • genre
  • name
    • firstName
    • lastName
    • middleName
    • findName
    • jobTitle
    • gender
    • prefix
    • suffix
    • title
    • jobDescriptor
    • jobArea
    • jobType
  • phone
    • phoneNumber
    • phoneNumberFormat
    • phoneFormats
  • random
    • number
    • float
    • arrayElement
    • arrayElements
    • objectElement
    • uuid
    • boolean
    • word
    • words
    • image
    • locale
    • alpha
    • alphaNumeric
    • hexaDecimal
  • system
    • fileName
    • commonFileName
    • mimeType
    • commonFileType
    • commonFileExt
    • fileType
    • fileExt
    • directoryPath
    • filePath
    • semver
  • time
    • recent
  • unique
  • vehicle
    • vehicle
    • manufacturer
    • model
    • type
    • fuel
    • vin
    • color
    • vrm
    • bicycle
  • word
    • adjective
    • adverb
    • conjunction
    • interjection
    • noun
    • preposition
    • verb

Blaver.fake()

Blaver contains a super useful generator method Blaver.fake for combining faker API methods using a mustache string format.

Example:

console.log(blaver.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}"));
// outputs: "Marks, Dean Sr."

This will interpolate the format string with the value of methods name.lastName(), name.firstName(), and name.suffix()

Localization

Blaver has support for multiple localities – ported directly from the orginal faker.js library (version v2.0.0).

The default language locale is set to English.

Setting a new locale is simple:

// sets locale to de
blaver.locale = "de";
  • az
  • ar
  • cz
  • de
  • de_AT
  • de_CH
  • en
  • en_AU
  • en_AU_ocker
  • en_BORK
  • en_CA
  • en_GB
  • en_IE
  • en_IND
  • en_US
  • en_ZA
  • es
  • es_MX
  • he
  • fa
  • fi
  • fr
  • fr_CA
  • fr_CH
  • ge
  • hy
  • hr
  • id_ID
  • it
  • ja
  • ko
  • mk
  • nb_NO
  • ne
  • nl
  • nl_BE
  • pl
  • pt_BR
  • pt_PT
  • ro
  • ru
  • sk
  • sv
  • tr
  • uk
  • vi
  • zh_CN
  • zh_TW

Individual Localization Packages

Blaver supports incremental loading of locales.

By default, requiring blaver will include all locale data.

In a production environment, you may only want to include the locale data for a specific set of locales.

// loads only de locale
var blaver = require('blaver/locale/de');

Setting a randomness seed

If you want consistent results, you can set your own seed:

blaver.seed(123);

var firstRandom = blaver.random.number();

// Setting the seed again resets the sequence.
blaver.seed(123);

var secondRandom = blaver.random.number();

console.log(firstRandom === secondRandom);

Tests

npm install .
make test

You can view a code coverage report generated in coverage/lcov-report/index.html.

Building Blaver

Blaver uses gulp to automate its build process. Each build operation is a separate task which can be run independently.

Browser Bundle

npm run browser

Building JSDocs

JSDOC v3 HTML API documentation

npm run jsdoc

Building Readme

The Readme.md file for blaver is automatically generated and should not be modified directly. All updates to Readme.md should be performed in ./build/src/docs.md and then the build script should be run.

npm run readme

Maintainers

Kumar Priyansh

Blaver - Copyright (c) 2022 - Present

https://github.com/luciferreeves/blaver

https://npmjs.com/package/blaver

Marak Squires

faker.js - Copyright (c) 2011 - 2022

http://github.com/marak/faker.js/

faker.js was inspired by and has used data definitions from:

You might also like...

Jetcap is a free online REST API that you can use whenever you need some fake data ✨

Jetcap Jetcap is a simple fake REST API for testing and prototyping. When to use ✨ Jetcap is a free online REST API that you can use whenever you need

Nov 13, 2022

A repository to generate the fake json data from protobuf.

Mock Protobuf A command-line tool to mock protobuf! Table of Contents Install Usage Generate Mock Data Mock Server Mock Server Data Filter Include Fil

Dec 7, 2022

`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages

 `raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages

`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages. Raaghu mfe can be used as a base to build complex components and UI layouts whilst maintaining a high level of reusability,flexibility with ease of maintenance.

Dec 30, 2022

Mixed Messages is a simple Node.js application, that will print a randomized fake fact to the terminal each time it is ran.

Mixed Messages - Fake Fact Generator Mixed Messages is a simple Node.js application, That will print a randomized fake fact to the terminal each time

Jan 10, 2022

simple PWA catalogue with vanilla javascript and json-server as a fake server

simple PWA catalogue with vanilla javascript and json-server as a fake server

simple PWA catalogue with vanilla javascript and json-server as a fake server

Mar 12, 2022

UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment.

UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment.

UAParser.js JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB m

Jan 4, 2023

A NPM package powered by Yeoman that generates a scaffolding boilerplate for back-end workflow with Node.js.

generator-noderplate Generate Node.js starter files with just one command! We have deployed a npm package that will generate a boilerplate for nodejs

Jan 24, 2022

Generates an image from a DOM node using HTML5 canvas

DOM to Image What is it dom-to-image is a library which can turn arbitrary DOM node into a vector (SVG) or raster (PNG or JPEG) image, written in Java

Jan 3, 2023

Deploying Fake Back-End Server & DataBase Using JSON-SERVER, GitHub, and Heroku

Deploying Fake Back-End Server & DataBase Using JSON-SERVER, GitHub, and Heroku

Deploying Fake Back-End Server & DataBase Using JSON-SERVER, GitHub, and Heroku. In this article, we will create and host a fake server that we can de

Sep 5, 2022
Comments
  • [FEATURE REQUEST] Consider merging with `@faker-js/faker`

    [FEATURE REQUEST] Consider merging with `@faker-js/faker`

    Hey, I saw this repo and was wondering if you'd want to be a maintainer in the@faker-js org. If not, more power to you! But, we've got a little community going and it may be easier than solo maintenance.

    enhancement 
    opened by damienwebdev 2
  • Update locales, Add UR locale and Fix random.unit.js test case

    Update locales, Add UR locale and Fix random.unit.js test case

    Fixes

    • Update all locales
    • Added UR locale
    • Fixed random.unit.js test case
    • Updated github actions to run lint and test scripts
    • Remove old public API from vendor/mersenne.js
    • [refactor] Unique options into class
    • jshint is replaced by eslint. Remove jshintrc and jshintignore files
    • Add nyc_output to npmignore
    opened by luciferreeves 0
  • [Enhancement] Move to a static documentation and a static readme

    [Enhancement] Move to a static documentation and a static readme

    Right now, we are generating documentation and readme dynamically using the scripts:

    • npm run readme
    • npm run jsdoc

    Now that we have a domain of our own, we should create a static documentation in the docs folder and serve from there. Also the readme should be concise and static. It does not need to contain names of all the functions. Those APIs can be moved to documentation.

    documentation enhancement help wanted refactor 
    opened by luciferreeves 0
  • Update to v6.6.8

    Update to v6.6.8

    This PR is going to remain here until all new features are merged. Any new PRs will be merged to this (v6.8.8) branch.

    For changelog, see commits. Final changelog will be added here as soon as v6.8.8 is ready to be released.

    documentation enhancement fix refactor future-pr 
    opened by luciferreeves 1
Releases(v6.6.7)
  • v6.6.7(Jan 7, 2022)

    Marak left Faker at v6.6.6. So, here I am picking up at v6.6.7. Calling it Blaver.

    Changelog:

    • Fixed unit test cases
    • Fixed all linting errors
    • Added bigInt() function
    • Fixed test cases for fakercloud
    • Update all locales
    • Added UR locale
    • Fixed random.unit.js test case
    • Updated github actions to run lint and test scripts
    • Remove old public API from vendor/mersenne.js
    • [refactor] Unique options into class
    • jshint is replaced by eslint. Remove jshintrc and jshintignore files
    • Add nyc_output to npmignore
    • Working Coveralls Coverage
    Source code(tar.gz)
    Source code(zip)
    blaver.js(6.76 MB)
    blaver.min.js(1.75 MB)
Owner
Priyansh
Just another stupid person trying to change the world and Member of the 9-year old army!
Priyansh
Generate massive amounts of fake data in the browser and node.js

Faker Generate massive amounts of fake data in the browser and node.js. FAQ - What happened to the original faker.js? This project was originally crea

faker-js 8.4k Jan 2, 2023
Generate massive amounts of fake data in the browser and node.js

Faker Generate massive amounts of fake data in the Browser and Node.js. Installation Please replace your faker dependency with @faker-js/faker. This i

faker-js 8.4k Jan 4, 2023
A set of javascript packages that generates fake data for you.

Faker A set of javascript packages that generates fake data for you. Install $ npm install --save @fakerjs/faker Usage import faker from '@fakerjs/fa

The New Faker for JavaScript 33 Apr 18, 2022
Generate deterministic fake values: The same input will always generate the same fake-output.

import { copycat } from '@snaplet/copycat' copycat.email('foo') // => '[email protected]' copycat.email('bar') // => 'Thurman.Schowalter668@

Snaplet 201 Dec 30, 2022
Backup of faker.js source code.

This is mirrored project from faker.js. This is created because it seemed to have been hacked. faker.js - generate massive amounts of fake data in the

dohyeon lee 2 Jan 8, 2022
Clinton Mbonu 20 Jun 30, 2022
tooldb is a (soon) massive collection of frameworks and tools. It's build on Flowbite, Next.js, Tailwind CSS and uses Supabase.

tooldb is a (soon) massive collection of frameworks and tools. It's build on Flowbite, Next.js, Tailwind CSS and uses Supabase.

Julian Yaman 12 Jul 14, 2022
Massive Open-Source Anti-agression Intelligence Collection is intended for civilians to be able to submit and verify intelligence items about an attacking force.

Massive Open-Source Anti-agression Intelligence Collection is intended for civilians to be able to submit and verify intelligence items about an attacking force.

William Brochmann 3 Mar 1, 2022
A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

Mayank 7 Jun 27, 2022
All the Fake Data for All Your Real Needs 🙂

All the Fake Data for All Your Real Needs ?? Run it on Stackblitz Installation npm i @ngneat/falso yarn add @ngneat/falso Methods rand<T>(arr: T[]):

ngneat 2.8k Dec 29, 2022