Random Avatar URL
Generates a random avatar URL from randomuser.me
Usage
npm install --save @dudadev/random-img
The main export is a function that returns a promise:
const imgGen = require('@dudadev/random-img');
imgGen().then(avatarURL => {...});
If invoked without options, the function will return a random avatar.
Configuration
options.gender
Can be either men
or women
, to ask for a specific gender.
options.id
Can be a number between 1-96 to ask for a consistent id.
Example
imgGen({ gender: 'men', id: 5 })
.then(avatarUrl => )