random-emoji
Advanced tools
Weekly downloads
Readme
Get random emoji!
npm install random-emoji
var randomEmoji = require('random-emoji');
// Array of five random emoji
randomEmoji.random({count: 5});
// Array of lines for an emoji haiku
randomEmoji.haiku({
host: '/images'
});
// Each array is made up of emoji objects
[{
"character": "🐳",
"name": "whale",
"image": "<img class=\"emoji\" title=\"whale\" alt=\"whale\" src=\"/images/whale.png\" height=\"64\" />",
"imageSrc": "/images/whale.png"
},
{
"character": "🍮",
"name": "custard",
"image": "<img class=\"emoji\" title=\"custard\" alt=\"custard\" src=\"/images/custard.png\" height=\"64\" />",
"imageSrc": "/images/custard.png"
}]
{
// The number of emojis to return (only for `random`)
count: 3,
// The height of each image in the returned image tag (defaults to '64')
height: 64,
// The host will be prepened to the src in the image tag (defaults to '/')
host: '/'
}
random()
: Random emojis!haiku()
: Returns a three item array made up enough emojis in each so the names contain 5, 7, 5 syllablesCredit to nlf for all the haiku code.
MIT
FAQs
Flavors of random emoji: fortunes, haikus, etc.
The npm package random-emoji receives a total of 288 weekly downloads. As such, random-emoji popularity was classified as not popular.
We found that random-emoji demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.