All the Fake Data for All Your Real Needs 🙂

Overview


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[]): T

import { rand } from '@ngneat/falso';

// Random item from array
rand([1, 2, 3, 4, 5]);

seed(value?: string)

import { rand, seed } from '@ngneat/falso';

seed('some-constant-seed');
// Always returns 2
rand([1, 2, 3, 4, 5]);
// Reset random seed
seed();

zipCode()

import { zipCode } from '@ngneat/falso';

// 53911
zipCode();

zipCodeByState()

import { zipCodeByState } from '@ngneat/falso';

// 78062
zipCodeByState();

city()

import { city } from '@ngneat/falso';

// South Verdieton
city();

cityPrefix()

import { cityPrefix } from '@ngneat/falso';

// West
cityPrefix();

citySuffix()

import { citySuffix } from '@ngneat/falso';

// town
citySuffix();

cityName()

import { cityName } from '@ngneat/falso';

// Lake Charles
cityName();

streetName()

import { streetName } from '@ngneat/falso';

// Cronin Shoal
streetName();

streetAddress()

import { streetAddress } from '@ngneat/falso';

// 58739 Bridie Mission
streetAddress();

streetSuffix()

import { streetSuffix } from '@ngneat/falso';

// Square
streetSuffix();

streetPrefix()

import { streetPrefix } from '@ngneat/falso';

// c
streetPrefix();

secondaryAddress()

import { secondaryAddress } from '@ngneat/falso';

// Apt. 977
secondaryAddress();

county()

import { county } from '@ngneat/falso';

// Berkshire
county();

country()

import { country } from '@ngneat/falso';

// Saint Kitts and Nevis
country();

countryCode()

import { countryCode } from '@ngneat/falso';

// BN
countryCode();

state()

import { state } from '@ngneat/falso';

// Kentucky
state();

stateAbbr()

import { stateAbbr } from '@ngneat/falso';

// OK
stateAbbr();

latitude()

import { latitude } from '@ngneat/falso';

// 46.1515
latitude();

longitude()

import { longitude } from '@ngneat/falso';

// -162.0090
longitude();

direction()

import { direction } from '@ngneat/falso';

// West
direction();

cardinalDirection()

import { cardinalDirection } from '@ngneat/falso';

// North
cardinalDirection();

ordinalDirection()

import { ordinalDirection } from '@ngneat/falso';

// Northwest
ordinalDirection();

nearbyGPSCoordinate()

import { nearbyGPSCoordinate } from '@ngneat/falso';

// 55.6541,53.7382
nearbyGPSCoordinate();

timeZone()

import { timeZone } from '@ngneat/falso';

// Europe/Minsk
timeZone();

dog()

import { dog } from '@ngneat/falso';

// Newfoundland
dog();

cat()

import { cat } from '@ngneat/falso';

// Singapura
cat();

snake()

import { snake } from '@ngneat/falso';

// Whip snake
snake();

bear()

import { bear } from '@ngneat/falso';

// Sloth bear
bear();

lion()

import { lion } from '@ngneat/falso';

// Asiatic Lion
lion();

cetacean()

import { cetacean } from '@ngneat/falso';

// Rough-Toothed Dolphin
cetacean();

horse()

import { horse } from '@ngneat/falso';

// Mezőhegyesi Sport Horse
horse();

bird()

import { bird } from '@ngneat/falso';

// Oriental Greenfinch
bird();

cow()

import { cow } from '@ngneat/falso';

// Fleckvieh
cow();

fish()

import { fish } from '@ngneat/falso';

// Silver carp
fish();

crocodilia()

import { crocodilia } from '@ngneat/falso';

// Australian Freshwater Crocodile
crocodilia();

insect()

import { insect } from '@ngneat/falso';

// Tramp ant
insect();

rabbit()

import { rabbit } from '@ngneat/falso';

// Thrianta
rabbit();

animalType()

import { animalType } from '@ngneat/falso';

// lion
animalType();

databaseColumn()

import { databaseColumn } from '@ngneat/falso';

// name
databaseColumn();

databaseType()

import { databaseType } from '@ngneat/falso';

// blob
databaseType();

databaseCollation()

import { databaseCollation } from '@ngneat/falso';

// ascii_bin
databaseCollation();

databaseEngine()

import { databaseEngine } from '@ngneat/falso';

// CSV
databaseEngine();

account()

import { account } from '@ngneat/falso';

// 20671518
account();

accountName()

import { accountName } from '@ngneat/falso';

// Auto Loan Account
accountName();

routingNumber()

import { routingNumber } from '@ngneat/falso';

// 388938496
routingNumber();

mask()

import { mask } from '@ngneat/falso';

// 0512
mask();

amount()

import { amount } from '@ngneat/falso';

// 106.53
amount();

transactionType()

import { transactionType } from '@ngneat/falso';

// payment
transactionType();

currencyCode()

import { currencyCode } from '@ngneat/falso';

// BRL
currencyCode();

currencyName()

import { currencyName } from '@ngneat/falso';

// Cedi
currencyName();

currencySymbol()

import { currencySymbol } from '@ngneat/falso';

// Bs
currencySymbol();

bitcoinAddress()

import { bitcoinAddress } from '@ngneat/falso';

// 1G9dhM9ff8N6cgDZCgSnibB1no57H7J9
bitcoinAddress();

litecoinAddress()

import { litecoinAddress } from '@ngneat/falso';

// LckeY4qm4fQ3Ak6D9GcjCxSw4VfWM9Mb
litecoinAddress();

creditCardNumber()

import { creditCardNumber } from '@ngneat/falso';

// 6767-7396-3947-1726
creditCardNumber();

creditCardCVV()

import { creditCardCVV } from '@ngneat/falso';

// 000
creditCardCVV();

ethereumAddress()

import { ethereumAddress } from '@ngneat/falso';

// 0xfeff5fc09fc64ddde1cb09cdbba9d5aa1bd60028
ethereumAddress();

iban()

import { iban } from '@ngneat/falso';

// GE17XK9613803086740003
iban();

bic()

import { bic } from '@ngneat/falso';

// PQHACYL1
bic();

transactionDescription()

import { transactionDescription } from '@ngneat/falso';

// payment transaction at Sporer, Russel and Johns using card ending with ***8561 for BSD 49.46 in account ***40753949
transactionDescription();

gitBranch()

import { gitBranch } from '@ngneat/falso';

// card-quantify
gitBranch();

gitCommitEntry()

import { gitCommitEntry } from '@ngneat/falso';

// commit 891053aa674ab65bb014687554ac559d0118a29a
Author: Josiane Bernhard <Hubert55@gmail.com>
Date: Sat Jan 08 2022 11:38:54 GMT+0200 (Israel Standard Time)

    copy online firewall

gitCommitEntry()

gitCommitMessage()

import { gitCommitMessage } from '@ngneat/falso';

// calculate wireless capacitor
gitCommitMessage();

gitCommitSha()

import { gitCommitSha } from '@ngneat/falso';

// 90740f1b9840ad81c49601fee57fad2aaffc4b75
gitCommitSha();

gitShortSha()

import { gitShortSha } from '@ngneat/falso';

// 391f6d5
gitShortSha();

createCard()

import { createCard } from '@ngneat/falso';

// [object Object]
createCard();

contextualCard()

import { contextualCard } from '@ngneat/falso';

// [object Object]
contextualCard();

userCard()

import { userCard } from '@ngneat/falso';

// [object Object]
userCard();

createTransaction()

import { createTransaction } from '@ngneat/falso';

// [object Object]
createTransaction();

img()

import { img } from '@ngneat/falso';

// http://placeimg.com/640/480/city
img();

imgAvatar()

import { imgAvatar } from '@ngneat/falso';

// https://cdn.fakercloud.com/avatars/baluli_128.jpg
imgAvatar();

imgImageUrl()

import { imgImageUrl } from '@ngneat/falso';

// http://placeimg.com/640/480
imgImageUrl();

imgAbstract()

import { imgAbstract } from '@ngneat/falso';

// http://placeimg.com/640/480/abstract
imgAbstract();

imgAnimals()

import { imgAnimals } from '@ngneat/falso';

// http://placeimg.com/640/480/animals
imgAnimals();

imgBusiness()

import { imgBusiness } from '@ngneat/falso';

// http://placeimg.com/640/480/business
imgBusiness();

imgCats()

import { imgCats } from '@ngneat/falso';

// http://placeimg.com/640/480/cats
imgCats();

imgCity()

import { imgCity } from '@ngneat/falso';

// http://placeimg.com/640/480/city
imgCity();

imgFood()

import { imgFood } from '@ngneat/falso';

// http://placeimg.com/640/480/food
imgFood();

imgNightlife()

import { imgNightlife } from '@ngneat/falso';

// http://placeimg.com/640/480/nightlife
imgNightlife();

imgFashion()

import { imgFashion } from '@ngneat/falso';

// http://placeimg.com/640/480/fashion
imgFashion();

imgPeople()

import { imgPeople } from '@ngneat/falso';

// http://placeimg.com/640/480/people
imgPeople();

imgNature()

import { imgNature } from '@ngneat/falso';

// http://placeimg.com/640/480/nature
imgNature();

imgSports()

import { imgSports } from '@ngneat/falso';

// http://placeimg.com/640/480/sports
imgSports();

imgTechnics()

import { imgTechnics } from '@ngneat/falso';

// http://placeimg.com/640/480/technics
imgTechnics();

imgTransport()

import { imgTransport } from '@ngneat/falso';

// http://placeimg.com/640/480/transport
imgTransport();

imgDataUri()

import { imgDataUri } from '@ngneat/falso';

// data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22undefined%22%20height%3D%22undefined%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22grey%22%2F%3E%3Ctext%20x%3D%22NaN%22%20y%3D%22NaN%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3Eundefinedxundefined%3C%2Ftext%3E%3C%2Fsvg%3E
imgDataUri();

imgLorempixel()

import { imgLorempixel } from '@ngneat/falso';

// undefined
imgLorempixel();

avatar()

import { avatar } from '@ngneat/falso';

// https://i.pravatar.cc/300
avatar();

email()

import { email } from '@ngneat/falso';

// Eliezer.Powlowski87@yahoo.com
email();

exampleEmail()

import { exampleEmail } from '@ngneat/falso';

// Obie.Mohr@example.org
exampleEmail();

userName()

import { userName } from '@ngneat/falso';

// Edwina19
userName();

protocol()

import { protocol } from '@ngneat/falso';

// https
protocol();

httpMethod()

import { httpMethod } from '@ngneat/falso';

// PUT
httpMethod();

url()

import { url } from '@ngneat/falso';

// http://shaniya.name
url();

domainName()

import { domainName } from '@ngneat/falso';

// lue.info
domainName();

domainSuffix()

import { domainSuffix } from '@ngneat/falso';

// name
domainSuffix();

domainWord()

import { domainWord } from '@ngneat/falso';

// nikki
domainWord();

ip()

import { ip } from '@ngneat/falso';

// 106.192.20.47
ip();

ipv6()

import { ipv6 } from '@ngneat/falso';

// ac87:88aa:10e7:8e96:e597:c246:f80f:ce28
ipv6();

port()

import { port } from '@ngneat/falso';

// 50806
port();

userAgent()

import { userAgent } from '@ngneat/falso';

// Mozilla/5.0 (Windows; U; Windows NT 6.1) AppleWebKit/534.1.0 (KHTML, like Gecko) Chrome/26.0.884.0 Safari/534.1.0
userAgent();

color()

import { color } from '@ngneat/falso';

// #3b3a35
color();

mac()

import { mac } from '@ngneat/falso';

// 93:be:c6:bd:51:dc
mac();

password()

import { password } from '@ngneat/falso';

// ot88Rrqu3c8sxc1
password();

word()

import { word } from '@ngneat/falso';

// possimus
word();

words()

import { words } from '@ngneat/falso';

// nemo saepe quas
words();

sentence()

import { sentence } from '@ngneat/falso';

// Quam illo amet ipsa.
sentence();

slug()

import { slug } from '@ngneat/falso';

// necessitatibus-vitae-ut
slug();

sentences()

import { sentences } from '@ngneat/falso';

// Et voluptas sit et tempora officiis vitae. Non laboriosam qui quos sit itaque voluptas aperiam. Fuga rem ducimus pariatur atque excepturi.
sentences();

paragraph()

import { paragraph } from '@ngneat/falso';

// Odit consequatur nobis aut quo dolores in adipisci praesentium. Quod rerum ducimus ad. Ut autem velit consequatur nihil animi animi architecto. Quaerat et sed.
paragraph();

paragraphs()

import { paragraphs } from '@ngneat/falso';

// Similique unde asperiores ea dignissimos eligendi et perferendis nemo aperiam. Assumenda delectus deleniti quaerat necessitatibus omnis sed ex. Ab cum voluptates consequatur excepturi ut laboriosam voluptate. Ipsum ex ad nihil et.

Est ut delectus qui at ab ratione. Vel porro consequatur inventore vel tempore quibusdam expedita nihil ipsam. Alias hic eos perferendis omnis architecto natus quidem. Magni magnam magnam commodi et in molestiae. Qui fugiat doloremque.

Fugiat excepturi fugiat. Velit itaque expedita doloribus aut ut non mollitia provident. Expedita error quia labore cum non voluptatem. Est et corporis quibusdam voluptatem magnam aliquam est. Quis dignissimos ex est fugit ullam dignissimos non laboriosam.
paragraphs()

text()

import { text } from '@ngneat/falso';

// Architecto et modi. Dolorem delectus quod eos facere architecto tempore.
text();

lines()

import { lines } from '@ngneat/falso';

// Voluptatibus harum ullam odio sed animi corporis.
lines();

genre()

import { genre } from '@ngneat/falso';

// Jazz
genre();

firstName()

import { firstName } from '@ngneat/falso';

// Xavier
firstName();

lastName()

import { lastName } from '@ngneat/falso';

// Schuster
lastName();

middleName()

import { middleName } from '@ngneat/falso';

// a
middleName();

findName()

import { findName } from '@ngneat/falso';

// Freda Satterfield
findName();

jobTitle()

import { jobTitle } from '@ngneat/falso';

// International Brand Associate
jobTitle();

gender()

import { gender } from '@ngneat/falso';

// Male to female trans woman
gender();

prefix()

import { prefix } from '@ngneat/falso';

// Mrs.
prefix();

suffix()

import { suffix } from '@ngneat/falso';

// II
suffix();

title()

import { title } from '@ngneat/falso';

// International Security Administrator
title();

jobDescriptor()

import { jobDescriptor } from '@ngneat/falso';

// Human
jobDescriptor();

jobArea()

import { jobArea } from '@ngneat/falso';

// Integration
jobArea();

jobType()

import { jobType } from '@ngneat/falso';

// Agent
jobType();

phoneNumber()

import { phoneNumber } from '@ngneat/falso';

// (663) 807-0501
phoneNumber();

phoneNumberFormat()

import { phoneNumberFormat } from '@ngneat/falso';

// 768-523-3116
phoneNumberFormat();

fileName()

import { fileName } from '@ngneat/falso';

// extensible_up.skm
fileName();

commonFileName()

import { commonFileName } from '@ngneat/falso';

// tools_vatu.m2a
commonFileName();

mimeType()

import { mimeType } from '@ngneat/falso';

// audio/vnd.dts.hd
mimeType();

commonFileType()

import { commonFileType } from '@ngneat/falso';

// text
commonFileType();

commonFileExt()

import { commonFileExt } from '@ngneat/falso';

// gif
commonFileExt();

fileType()

import { fileType } from '@ngneat/falso';

// x-shader
fileType();

fileExt()

import { fileExt } from '@ngneat/falso';

// meta4
fileExt();

directoryPath()

import { directoryPath } from '@ngneat/falso';

// /home/user
directoryPath();

filePath()

import { filePath } from '@ngneat/falso';

// /lib/ports_calculating.ogg.wm
filePath();

semver()

import { semver } from '@ngneat/falso';

// 3.2.0
semver();

vehicle()

import { vehicle } from '@ngneat/falso';

// Jaguar Beetle
vehicle();

vehicleManufacturer()

import { vehicleManufacturer } from '@ngneat/falso';

// Mazda
vehicleManufacturer();

vehicleModel()

import { vehicleModel } from '@ngneat/falso';

// Escalade
vehicleModel();

vehicleType()

import { vehicleType } from '@ngneat/falso';

// Hatchback
vehicleType();

vehicleFuel()

import { vehicleFuel } from '@ngneat/falso';

// Gasoline
vehicleFuel();

vehicleVin()

import { vehicleVin } from '@ngneat/falso';

// L91TRNWFV4TV61435
vehicleVin();

vehicleColor()

import { vehicleColor } from '@ngneat/falso';

// blue
vehicleColor();

vehicleVrm()

import { vehicleVrm } from '@ngneat/falso';

// GZ51DDM
vehicleVrm();

randomNumber()

import { randomNumber } from '@ngneat/falso';

// 25895
randomNumber();

randomFloat({ min?: number; max?: number: fraction?: number })

import { randomFloat } from '@ngneat/falso';

// 3212.9
randomFloat();

// 123.93
randomFloat({ min: 110.12 });

// 12.75
randomFloat({ max: 14.12 });

// 5478.12365
randomFloat({ fraction: 5 });

// 12.93
randomFloat({ min: 8.85, max: 22.25 });

// 32.5555
randomFloat({ min: 8.85, max: 40.25, fraction: 4 });

randomArrayElement()

import { randomArrayElement } from '@ngneat/falso';

// c
randomArrayElement();

randomArrayElements()

import { randomArrayElements } from '@ngneat/falso';

// b
randomArrayElements();

randomObjectElement()

import { randomObjectElement } from '@ngneat/falso';

// car
randomObjectElement();

randomUuid()

import { randomUuid } from '@ngneat/falso';

// 8c858281-f3bd-4547-89a1-d5422d552f49
randomUuid();

randomBoolean()

import { randomBoolean } from '@ngneat/falso';

// true
randomBoolean();

randomWord()

import { randomWord } from '@ngneat/falso';

// Lane
randomWord();

randomWords()

import { randomWords } from '@ngneat/falso';

// calculating engineer Paradigm
randomWords();

randomImage()

import { randomImage } from '@ngneat/falso';

// http://placeimg.com/640/480/fashion
randomImage();

randomLocale()

import { randomLocale } from '@ngneat/falso';

// es
randomLocale();

randomAlpha()

import { randomAlpha } from '@ngneat/falso';

// a
randomAlpha();

randomAlphaNumeric()

import { randomAlphaNumeric } from '@ngneat/falso';

// n
randomAlphaNumeric();

randomHexaDecimal()

import { randomHexaDecimal } from '@ngneat/falso';

// 0x9
randomHexaDecimal();

abbreviation()

import { abbreviation } from '@ngneat/falso';

// IB
abbreviation();

adjective()

import { adjective } from '@ngneat/falso';

// open-source
adjective();

noun()

import { noun } from '@ngneat/falso';

// program
noun();

verb()

import { verb } from '@ngneat/falso';

// transmit
verb();

ingverb()

import { ingverb } from '@ngneat/falso';

// generating
ingverb();

phrase()

import { phrase } from '@ngneat/falso';

// Use the redundant AGP transmitter, then you can generate the 1080p circuit!
phrase();

datatypeNumber()

import { datatypeNumber } from '@ngneat/falso';

// 78512
datatypeNumber();

datatypeFloat()

import { datatypeFloat } from '@ngneat/falso';

// 10850.48
datatypeFloat();

datatypeDatetime()

import { datatypeDatetime } from '@ngneat/falso';

// 2044-03-01T02:44:38.858Z
datatypeDatetime();

datatypeString()

import { datatypeString } from '@ngneat/falso';

// 9l;Cczuop:
datatypeString();

datatypeUuid()

import { datatypeUuid } from '@ngneat/falso';

// 2db5df9a-d57f-467d-aff1-f4f55003ffec
datatypeUuid();

datatypeBoolean()

import { datatypeBoolean } from '@ngneat/falso';

// false
datatypeBoolean();

datatypeHexaDecimal()

import { datatypeHexaDecimal } from '@ngneat/falso';

// 0x1
datatypeHexaDecimal();

datatypeJson()

import { datatypeJson } from '@ngneat/falso';

// {"foo":961,"bar":15395,"bike":84052,"a":"q{nV`XZSL:","b":"Jf+!S%L7|a","name":44555,"prop":"1kZqZtUCi;"}
datatypeJson();

datatypeArray()

import { datatypeArray } from '@ngneat/falso';

// rcLGl`\39?,75339,]EY4r9w+oZ,Fo]JU'!.6z,75966,37122,45736,s5G|iKoXEh,4I?g!H?|D!,gX2wM4w*SM
datatypeArray();

suffixes()

import { suffixes } from '@ngneat/falso';

// Inc,and Sons,LLC,Group
suffixes();

companyName()

import { companyName } from '@ngneat/falso';

// Maggio, Wisoky and Blick
companyName();

companySuffix()

import { companySuffix } from '@ngneat/falso';

// and Sons
companySuffix();

catchPhrase()

import { catchPhrase } from '@ngneat/falso';

// Universal empowering product
catchPhrase();

bs()

import { bs } from '@ngneat/falso';

// productize visionary mindshare
bs();

catchPhraseAdjective()

import { catchPhraseAdjective } from '@ngneat/falso';

// Persevering
catchPhraseAdjective();

catchPhraseDescriptor()

import { catchPhraseDescriptor } from '@ngneat/falso';

// web-enabled
catchPhraseDescriptor();

catchPhraseNoun()

import { catchPhraseNoun } from '@ngneat/falso';

// process improvement
catchPhraseNoun();

bsAdjective()

import { bsAdjective } from '@ngneat/falso';

// best-of-breed
bsAdjective();

bsBuzz()

import { bsBuzz } from '@ngneat/falso';

// synergize
bsBuzz();

bsNoun()

import { bsNoun } from '@ngneat/falso';

// action-items
bsNoun();

department()

import { department } from '@ngneat/falso';

// Beauty
department();

productName()

import { productName } from '@ngneat/falso';

// Handmade Plastic Tuna
productName();

price()

import { price } from '@ngneat/falso';

// 315.00
price();

productAdjective()

import { productAdjective } from '@ngneat/falso';

// Intelligent
productAdjective();

productMaterial()

import { productMaterial } from '@ngneat/falso';

// Concrete
productMaterial();

product()

import { product } from '@ngneat/falso';

// Soap
product();

productDescription()

import { productDescription } from '@ngneat/falso';

// The beautiful range of Apple Naturalé that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients
productDescription();

rgb({ alpha: boolean })

import { rgb } from '@ngneat/falso';

// rgb(255,255,255)
rgb();

// rgba(255,255,255,0.5)
rgb({ alpha: true });

hex()

import { hex } from '@ngneat/falso';

// #ffffff
hex();

programmingLanguage()

import { programmingLanguage } from '@ngneat/falso';
        
// TypeScript
programmingLanguage()

Credit: Some of the data was generated by faker.js

Icons made by Freepik from www.flaticon.com
Comments
  • feat: 🔥 build locales

    feat: 🔥 build locales

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [ ] Tests for the changes have been added (for bug fixes / features)
    • [ ] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    [ ] Bugfix
    [x] Feature
    [ ] Code style update (formatting, local variables)
    [ ] Refactoring (no functional changes, no api changes)
    [ ] Build related changes
    [ ] CI related changes
    [ ] Documentation content changes
    [ ] Other... Please describe:
    

    What is the current behavior?

    Issue Number: #1

    What is the new behavior?

    The build-locales target can build all locales under packages/falso/src/lib/locales folder. Only a barrel file per locale (ru/index.ts, es/index.ts`, etc.) is required.

    Does this PR introduce a breaking change?

    [ ] Yes
    [x] No
    

    Other information

    opened by michaelxvoelker 25
  • Make falso available in doc site

    Make falso available in doc site

    Description

    Firstly: many thanks for your work !

    Put falso into page of doc, as it, we can test it directly in the doc. Like some on tools (thinking about moment, date-fns, ...)

    Proposed solution

    No response

    Alternatives considered

    No response

    Do you want to create a pull request?

    No

    opened by MathRobin 13
  • Locales Support

    Locales Support

    Description

    Add locales support

    Proposed solution

    Generate data via google translate?

    Alternatives considered

    ?

    Do you want to create a pull request?

    No

    enhancement 
    opened by NetanelBasal 12
  • feat: 🔥 Add food from LATAM

    feat: 🔥 Add food from LATAM

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [ ] Tests for the changes have been added (for bug fixes / features)
    • [ ] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    [ ] Bugfix
    [x] Feature
    [ ] Code style update (formatting, local variables)
    [ ] Refactoring (no functional changes, no api changes)
    [ ] Build related changes
    [ ] CI related changes
    [ ] Documentation content changes
    [ ] Other... Please describe:
    

    What is the current behavior?

    Getting random food from anywhere but LATAM.

    What is the new behavior?

    Add food from LATAM

    Does this PR introduce a breaking change?

    [ ] Yes
    [x] No
    

    Other information

    opened by midudev 11
  • Code snippets are not visible in dark mode

    Code snippets are not visible in dark mode

    Is this a regression?

    No

    Description

    The code colours not contrasting enough in dark mode meaning they are unreadable (Especially the key names).

    image

    Please provide a link to a minimal reproduction of the bug

    No response

    Please provide the exception or error you saw

    No response

    Please provide the environment you discovered this bug in

    No response

    Anything else?

    No response

    Do you want to create a pull request?

    Yes

    bug documentation 
    opened by theryansmee 11
  • Version 2

    Version 2

    Description

    Goals

    • Smaller Bundle
    • ~Added TODOS to generate the data programmatically in some functions~
    • Finalize the API
    • ~Create a docs generator~
    • Add comments for docs generation.

    Comment Structure:

    /**
     * Generate a random date between ranges.
     *
     * @category Date
     *
     * @example
     *
     * month()
     *
     * @example
     *
     * month({ from: Date, to: Date })
     *
     * @example
     *
     * month({ length: 10 })
     *
     */
    export function between<Options extends BetweenOptions>(options: Options) {}
    

    FINAL API

    • seed

    General

    • randomNumber
    • randomFloat
    • randomBoolean
    • randomImg
    • uuid
    • locale
    • rand

    System

    • fileName
    • mimeType
    • fileType
    • fileExt
    • directoryPath
    • filePath
    • semver

    Text

    • text
    • word
    • sentence
    • alpha
    • alphaNumeric
    • slug
    • abbreviation
    • adjective
    • noun
    • verb
    • ingverb
    • phrase

    Jobs

    • jobTitle
    • jobDescriptor
    • jobArea
    • jobType

    Internet

    • protocol
    • httpMethod
    • url
    • domainName
    • domainSuffix
    • domainWord
    • ip
    • ipv6
    • port
    • userAgent
    • mac

    Person

    • firstName
    • lastName
    • fullName
    • middleName
    • gender
    • personPrefix
    • phone
    • email
    • avatar
    • password
    • userName

    Colors

    • rgb
    • hex
    • hsl

    Date

    • past
    • future
    • between
    • recent
    • soon
    • month
    • weekday

    COMMERCE

    • department
    • productName
    • price
    • productAdjective
    • productMaterial
    • product
    • productDescription

    Company

    Note: Prefix each function with company and max 20 items for each

    • name
    • suffix
    • phrase
    • catchPhraseAdjective
    • catchPhraseDescriptor
    • catchPhraseNoun
    • bsAdjective
    • bsBuzz
    • bsNoun

    Database

    Note: Prefix each function with database and max 20 items for each

    • column
    • type
    • collation
    • engine

    Address

    • zipCode
    • zipCodeByState
    • city
    • streetName
    • streetAddress
    • county
    • country
    • countryCode
    • state
    • stateAbbr
    • latitude
    • longitude
    • direction
    • cardinalDirection
    • ordinalDirection
    • nearbyGPSCoordinate
    • timeZone

    Finance

    • account
    • routingNumber
    • mask
    • amount
    • transactionType
    • currencyCode
    • currencyName
    • currencySymbol
    • bitcoinAddress
    • creditCardNumber
    • creditCardCVV
    • ethereumAddress
    • iban
    • bic
    • transactionDescription

    Git

    • branch
    • commitEntry
    • commitMessage
    • commitSha
    • shortSha

    Animals

    Note: max 20 items for each

    • dog
    • cat
    • snake
    • bear
    • lion
    • cetacean
    • horse
    • bird
    • cow
    • fish
    • crocodilia
    • insect
    • rabbit
    • animalType

    Vehicle

    Note: Prefix each function with vehicle and max 20 items for each

    • manufacturer
    • model
    • type
    • fuel
    • vin
    • vrm
    • bicycle

    Proposed solution

    No response

    Alternatives considered

    No response

    Do you want to create a pull request?

    No

    opened by NetanelBasal 11
  • feat: 🔥 Replace accented chars in email addresses

    feat: 🔥 Replace accented chars in email addresses

    Add core string manipulation function to replace accented chars with regular ones. Move capitalize first lettercapitalizeFirstLetter to string-manipulation

    ✅ Closes: #153

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [x] Tests for the changes have been added (for bug fixes / features)
    • [x] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    [x] Bugfix
    [x] Feature
    [ ] Code style update (formatting, local variables)
    [ ] Refactoring (no functional changes, no api changes)
    [ ] Build related changes
    [ ] CI related changes
    [ ] Documentation content changes
    [ ] Other... Please describe:
    

    What is the current behavior?

    Emails can contain accented characters

    Issue Number: #153

    What is the new behaviour?

    Accented names can be passed to randEmail but any accented characters will be replaced. This allows for real world scenarios such as a randUser having names with special characters but emails without.

    Does this PR introduce a breaking change?

    [ ] Yes
    [x] No
    

    Other information

    opened by theryansmee 10
  • Support gender for lastname / firstname generation

    Support gender for lastname / firstname generation

    Description

    Would love if we can use parameter with gender in randLastName() and randFirstName():

    randLastName({ gender: 'male' }); // Smith
    
    randFirstName({ gender: 'female' }); // Emma
    

    Proposed solution

    We need to sort current first names / last names by gender in json file including option withAccents and then add parameter gender with male | female types.

    @NetanelBasal how do you think about it?

    Alternatives considered

    No response

    Do you want to create a pull request?

    Yes

    opened by pumano 9
  • fix: 🐞 randJSON: prevent key overwritten when looping

    fix: 🐞 randJSON: prevent key overwritten when looping

    • Object key replaced with uuid()
    • Reduce replaced with For loop for better performance

    ✅ Closes: #180

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [x] Tests for the changes have been added (for bug fixes / features)
    • [x] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    [x] Bugfix
    [ ] Feature
    [ ] Code style update (formatting, local variables)
    [x] Refactoring (no functional changes, no api changes)
    [ ] Build related changes
    [ ] CI related changes
    [ ] Documentation content changes
    [ ] Other... Please describe:
    

    Issue Number: #180

    opened by rodrigofeijao 9
  • randCodeSnippet

    randCodeSnippet

    Description

    randCodeSnippet({ lang: 'html' })

    One small/medium snippet for top languages.

    // data
    
    {
       html: `snippet..`,
       javascript: `snippet...`
    }
    

    Proposed solution

    No response

    Alternatives considered

    No response

    Do you want to create a pull request?

    No

    enhancement good first issue 
    opened by NetanelBasal 9
  • Phone Number Formats

    Phone Number Formats

    Description

    Support formats in phone number function.

    References:

    https://gist.github.com/anubhavshrimal/75f6183458db8c453306f93521e93d37 https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers

    Proposed solution

    No response

    Alternatives considered

    No response

    Do you want to create a pull request?

    No

    enhancement good first issue help wanted PR is welcome 
    opened by NetanelBasal 9
  • randAvatar is not so random?

    randAvatar is not so random?

    Am I making a mistake with how I'm calling randAvatar? The returned value seems to just reflect whatever size is:

    return fake(() =>https://i.pravatar.cc/${size}, options);

    opened by SamBeroz 0
  • spec with randNumber failed randomly

    spec with randNumber failed randomly

    Is this a regression?

    No

    Description

    There are some intermittently failed specs using randNumber

    Please provide a link to a minimal reproduction of the bug

    No response

    Please provide the exception or error you saw

    Summary of all failing tests
    FAIL src/tests/json.spec.ts (7.215 s)
      ● randJSON › when it returns the expected values › should return an object with a random number of keys
    
        Max must be bigger than min
    
          51 | }: RandomInRangeOptions = {}) {
          52 |   if (max < min) {
        > 53 |     throw new Error('Max must be bigger than min');
             |           ^
          54 |   }
          55 |   return Number((random() * (max - min) + min).toFixed(fraction));
          56 | }
    
          at getRandomInRange (src/lib/core/core.ts:53:11)
          at src/lib/number.ts:62:33
          at fake (src/lib/core/core.ts:29:12)
          at randNumber (src/lib/number.ts:57:14)
          at Object.<anonymous> (src/tests/json.spec.ts:20:33)
    
    
    Test Suites: 1 failed, 93 passed, 94 total
    Tests:       1 failed, 418 passed, 419 total
    Snapshots:   0 total
    Time:        29.41 s
    Ran all test suites.
    
     FAIL   falso  packages/falso/src/tests/number.spec.ts
      ● randNumber › should return a random number with fraction
    
        expect(received).toBe(expected) // Object.is equality
    
        Expected: false
        Received: true
    
          12 |   it('should return a random number with fraction', () => {
          13 |     const num = randNumber({ min: 0.1, max: 1, fraction: 2 });
        > 14 |     expect(Number.isInteger(num)).toBe(false);
             |                                   ^
          15 |   });
    

    Please provide the environment you discovered this bug in

    No response

    Anything else?

    No response

    Do you want to create a pull request?

    No

    opened by PeterNgTr 2
  • chore: group files into folder

    chore: group files into folder

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [x] Tests for the changes have been added (for bug fixes / features)
    • [ ] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    • [ ] Bugfix
    • [ ] Feature
    • [ ] Code style update (formatting, local variables)
    • [x] Refactoring (no functional changes, no api changes)
    • [ ] Build related changes
    • [ ] CI related changes
    • [ ] Documentation content changes
    • [ ] Other... Please describe:

    What is the current behavior?

    • Issue Number: N/A
    • Resolve #issueNumber

    What is the new behavior?

    Does this PR introduce a breaking change?

    • [x] Yes
    • [ ] No

    Other information

    opened by PeterNgTr 4
  • feat(size): allow to specify string length of random values

    feat(size): allow to specify string length of random values

    PR Checklist

    Please check if your PR fulfills the following requirements:

    • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
    • [x] Tests for the changes have been added (for bug fixes / features)
    • [x] Docs have been added / updated (for bug fixes / features)

    PR Type

    What kind of change does this PR introduce?

    [ ] Bugfix
    [x] Feature
    [ ] Code style update (formatting, local variables)
    [ ] Refactoring (no functional changes, no api changes)
    [ ] Build related changes
    [ ] CI related changes
    [ ] Documentation content changes
    [ ] Other... Please describe:
    

    What is the current behavior?

    Issue Number: #299

    opened by va-stefanek 5
  • randChanceBoolean

    randChanceBoolean

    Description

    Currently we only have randBoolean, but sometimes you don't want there be 50% chance that the boolean will be true and a 50% chance that the boolean will be false. I therefore propose a function randChanceBoolean where you can specify the chance of the boolean being either true or false.

    Proposed solution

    You would call the function like this randChanceBoolean({ chanceTrue: 0.76 }) or randChanceBoolean({ chanceFalse: 0.1 }). Both chanceFalse and chanceTrue can't be provided in the same function call.

    Here's a simple code example for how this could be implemented:

    let base = 1;
    let percent = chanceTrue;
    
    while(percent % 1 !== 0) {
        percent *= 10;
        base *= 10;
    }
    
    return randNumber({min: 0; max: base}) >= percent;
    

    Alternatives considered

    No response

    Do you want to create a pull request?

    No

    enhancement good first issue 
    opened by PumpedSardines 1
  • fraction doesn't work on randAggregation

    fraction doesn't work on randAggregation

    Is this a regression?

    No

    Description

    When passing in the argument fraction to the function randAggregation nothing changes

    Please provide a link to a minimal reproduction of the bug

    No response

    Please provide the exception or error you saw

    Inputing
    
    function Demo(props) {
      return <Preview source={() => randAggregation({ values: 5, fraction: 5 })}/>;
    }
    

    On the docs page will not provide fractions

    
    
    ### Please provide the environment you discovered this bug in
    
    ```true
    On the docs page
    

    Anything else?

    No response

    Do you want to create a pull request?

    No

    bug good first issue 
    opened by PumpedSardines 0
Owner
ngneat
Powerful open sources for JS & Angular Applications
ngneat
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Short JavaScript code snippets for all your development needs

30 seconds of code Short JavaScript code snippets for all your development needs Visit our website to view our snippet collection. Use the Search page

30 seconds 106.1k Dec 30, 2022
Short CSS code snippets for all your development needs

30 seconds of CSS Short CSS code snippets for all your development needs Visit our website to view our snippet collection. Use the Search page to find

30 seconds 15.9k Jan 3, 2023
P.S Its easy is a website to cater to all your PS allotment needs

P.S. It's Easy All-in-one Web App for all your Practice School Allotment needs! Note: Developers trying to fork and test. Please wait, we'll set up a

Tanya Prasad 33 Sep 26, 2022
Short JavaScript code snippets for all your development needs

30 seconds of code Short JavaScript code snippets for all your development needs Visit our website to view our snippet collection. Use the Search page

30 seconds of code 106.1k Dec 28, 2022
📜 A tiny custom element for all your scrollytelling needs!

<scroll-scene> element A tiny custom element for all your scrollytelling needs! The successor to @newswire/scroller. Key features ?? Less than 700 byt

Ryan Murphy 17 Dec 6, 2022
faker.js - generate massive amounts of fake data in the browser and node.js

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

Wanderson Camargo 2 Jan 7, 2022
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
A JavaScript library built on top of the Faker.JS library. It generates massive amounts of fake data in the browser and node.js.

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 gene

Priyansh 113 Dec 30, 2022
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 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
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

Rades Pratama 8 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

Jasonkay 9 Dec 7, 2022
A "Basic-to-Lisp" compiler. But Basic is not real Basic, and Lisp is not real Lisp.

Basic2Lisp A "Basic-to-Lisp" compiler. But Basic is not real Basic, and Lisp is not real Lisp. Syntax Print-Sth Put some-value to standard output. PRI

Hana Yabuki 5 Jul 10, 2022
Flight is a universal package manager for your needs, no matter what language you may want to write your code in.

Flight Swift, reliable, multi-language package manager. ⚡ Installation We don't have an official release of Flight yet, however, if you would like to

null 26 Dec 25, 2022
A quick and powerful plugin for your pull-to-refresh needs in your webapp.

PulltoRefresh.js • Demos A small, but powerful Javascript library crafted to power your webapp's pull to refresh feature. No markup needed, highly cus

Box Factura 3.9k Jan 6, 2023
Tenzi is a dice game. The player needs to roll dice until they are all the same. Clicking on a dice, freezes it at its current value between rolls. Best scores are saved to local storage.

Roll until all dice are the same Try me! Technologies Used Description Tenzi is a dice game used to demonstrate the use of React Hooks (useState, useE

Michael Kolesidis 7 Nov 23, 2022