1.0.1 • Published 3 years ago

ascer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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!

1.0.1

3 years ago

1.0.0

3 years ago