Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

random-emoji

Package Overview
Dependencies
2
Maintainers
2
Versions
6
Issues
File Explorer

Advanced tools

random-emoji

Flavors of random emoji: fortunes, haikus, etc.

    1.0.2latest
    GitHub

Version published
Maintainers
2
Weekly downloads
353
decreased by-29.82%

Weekly downloads

Readme

Source

random-emoji

NPM Build Status

Get random emoji!

Install

npm install random-emoji

Usage

Basic

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" }]

Options

{ // 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: '/' }

Methods

  • random(): Random emojis!
  • haiku(): Returns a three item array made up enough emojis in each so the names contain 5, 7, 5 syllables

Credits

Credit to nlf for all the haiku code.

License

MIT

Keywords

FAQs

Last updated on 08 Aug 2016

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc