1.0.0 • Published 7 years ago
@mbanq/dupe v1.0.0
dupe your front- or backend
Mbanq uses dupe to create fake data that can be used during software
development or for running the tests.
Usage
Node.js
const dupe = require('@mbanq/dupe');
const randomName = dupe.name.full() // pkha romdol
const randomEmail = dupe.name.email() // pkha@romdol.com
const randomText = dupe.text.sentence()Methods
- text
sentence(n)- creates a random sentence withnwords in it. Default value ofnis 5
 - name
first()- returns a random first namelast()- returns a random last namefull()- returns a random full name in the formatfirst(), last()email()- returns a random email addres. Usesfirst(),last()and a random domain extension
 - location
country()- returns a random country from the list of countriescity()- returns a random city from the list of cities
 - finance
amount(max, precision)- returns a random amount <=maxwith the providedprecision. Defaultmax = 999999,precision = 2. Returns aStringtransactionType()- returns a random transaction type from the listaccountNumber(size)- returns an 8 digit account number per default. Can return up to 16 digit long number.accountType()- returns a random account type from the list.randomInt()- returns a random Integer between aminand amaxcardNumber()- returns a credit card number
 
Test
npm i
npm test