randomuser
v1.2.2
Published
A Simple Node.js Library for the https://randomuser.me REST API
Downloads
239
Maintainers
Readme
randomuser
A tiny NodeJS client for generating random users - https://randomuser.me.
Installation
- Install dependencies with
yarn
- Build the project with
yarn build
- Run tests with
yarn test
Getting started
const RandomUser = require('randomuser');
const client = new RandomUser();
// With options
client.getUsers({ seed: "foxie", results: 5, gender: "male" }, data => {
console.log(data);
});
// Without options
client.getUsers(data => {
console.log(data);
});
params {Object} Documentation
results
- number specifying number of results to returngenders
- string - "male" or "female" specifying gender to generateseed
- string - service will return same data for given seed
Contributing
Feel free to contribute!