Skip to content

Hodd1444/ascer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is ascer?

Ascer is a npm module to easily access the https://randomuser.me API and help you make your code less cluttery (but tbh it is infact not very useful)

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!

About

Easily access the randomuser.me API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published