rseed
v3.0.0
Published
Random readable data for seeding/testing
Downloads
49
Maintainers
Readme
Random seed package
A lightweight package that provides any amount of sain/readable randomized data. You can use it to seed your database or for any other such purpose.
Installing
To install this module run
npm install -D rseed
Usage/Examples
const { rseed } = require('rseed');
// or
import { rseed } from 'rseed';
const result = rseed.getNames(5).getSurnames(2).getResult();
console.log(result);
// Result object will be like
// {
// names: [ 'Bojan', 'Abdeus', 'Alvaro', 'Job', 'Adoniram' ],
// surnames: [ 'Seter', 'Hodne' ]
// }
// Or you can use the `only` method to retrieve data of one specific type
const result = rseed.only().getNames(5);
console.log(result);
// Result will be like
// [ 'Bojan', 'Abdeus', 'Alvaro', 'Job', 'Adoniram' ]
All methods
getNames(amount)
(names
inresult
object)getSurnames(amount)
(surnames
inresult
object)getMiddleNames(amount)
(middleNames
inresult
object)getPetsNames(amount)
(pets
inresult
object)getCountriesNames(amount)
(countries
inresult
object)getCitiesNames(amount)
(cities
inresult
object)getPhoneNumbers(amount)
(phoneNumbers
inresult
object)getAges(amount, min, max)
(ages
inresult
object)getMails(amount)
(mails
inresult
object)getRandomWords(amount)
(randomWords
inresult
object)getTestText(amountOfLetters)
(text
inresult
object)
Roadmap
- More methods 💪