Skip to content

ZaroSan/builder-faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version

Builder-Faker

Based on faker , allow you to build array of object by passing only keys in values

Installation

npm i builder-faker

Import

import BuilderFaker from "builder-faker/builder";

How to use it?

const yourBuilder=new BuilderFaker(numberOfObjects,arrayOfKeys);
//get your array
yourBuilder.object;
//exemple
const builder=new BuilderFaker(5,["id","name","email","this arg doesn't exist","snake","firstName","fish"]);

console.log(builder.object);

The class will search some methods what matches with the keys passed. If the key doesn't exist, it will take a random word

Tips

yourBuilder.savedMethods

saveMethods return an array of each methods used for each key

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published