ascer
v1.0.1
Published
Easily access the randomuser.me API
Downloads
1
Readme
What is ascer?
Ascer is a npm module to easily access the https://randomuser.me API and help you make your code less cluttery
Installation
npm install ascer
Example
const {getRandomUser} = require('ascer');
( async () => {
// Gets a random user and displays their first and last name
const user = await getRandomUser();
console.log(user.name.first + ' ' + user.name.last)
// Gets a random male user and displays their first and last name
// Gender options are 'male' and 'female'
const maleUser = await getRandomUser({gender: 'male'});
console.log(maleUser.name.first + ' ' + maleUser.name.last)
})();
Options
gender
: 'male' | 'female'
This is a very useless module I only created for myself but feel free to use it if you need!