This package helps you generate Nigerian data on the fly for use in your projects.
To get started, follow the instructions below
- install the package
npm install naija-faker
- import it in your app using either of:
import naijaFaker from 'naija-faker // if using ES6
const naijaFaker = require('naija-faker)
- use it!
naijaFaker.getFirstName()
- To generate an array of people, simply pass an
amt
value togetPerson()
i.egetPersonList({amt: 2})
- NB: Default
amt
is 5
getPersonList({amt: 2})
=>
[
{fName: 'abdul', lName: 'qadr', age: 40, email: '[email protected]', state:'ekiti' },
{fName: 'frank', lName: 'edoho', age: 23, email: '[email protected]', state:'delta' }
]`
getFirstName() //=> 'abraham'
getLastName() //=> 'fatai
-
NB: Currently only accepts one letter
-
getFirstName('r') //=> 'rahman'
-
getLastName('b') //=> 'bolanle'
- NB: Default age is between 18 - 50
getPerson()
//=> {fName: 'abdul', lName: 'qadr', age: 20, email: '[email protected]', state:'ekiti' }
-- To change the default `min` and `max` values for age, pass in min and max values as an object like below.
- e.g: ```
getPerson({min:20, max:50})
=> {
fName: 'abdul', lName: 'qadr', age: 40,
email: '[email protected]', state:'ekiti', bank:'Access bank'
}
-
Simply pass
amt
togetNameList()
e.gNB: Default
amt
is 5
getNameList({amt: 5})
- Simply call
getState() //=> 'Ondo'
- Simply call
getBank() //=> 'Access Bank'
👤 Adebola Adeniran
- Github: @githubhandle
- Twitter: @twitterhandle
- Linkedin: linkedin
- Web: Adebola
Contributions, issues and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.