random emoji function with zero dependencies
$ npm i @0xadada/random-emoji
$ npm run -s start
> π
$ npm run -s start
> π
$ node
> const { random } = require('@0xadada/random-emoji');
> random()
'π'
> let a = random(); // defaults to 'emoticons'
> let b = random('emoticons');
> let c = random('food');
> let d = random('animals');
> let e = random('expressions');
> console.log(a, b, c, d, e);
π π π π₯ π€’
Invoked without arguments, the function will return an emoji character within
the 'emoticons'
range of unicode characters.
Range
random
accepts an optional String
argument. This string describes the
characters within a subset of the unicode block that random
will be limited
to. Current options are:
'emoticons'
1F600-1F64F'food'
1F32D-1F37F'animals'
1F400-1F4D3'expressions'
1F910-1F92F