random-emoji 1.0.2

Flavors of random emoji: fortunes, haikus, etc.

Homepage: https://github.com/lukekarrys/random-emoji

Platform: npm

Language: JavaScript

License: MIT

Keywords: emoji, fortune, haiku

View on registry: https://www.npmjs.com/package/random-emoji

Direct download link: https://registry.npmjs.org/random-emoji/-/random-emoji-1.0.2.tgz

Install: npm install [email protected]


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

Releases

1.0.2 August 08, 2016
1.0.1 March 23, 2016
1.0.0 August 02, 2014
0.1.2 May 23, 2014
0.1.1 May 22, 2014
0.1.0 May 21, 2014

Project Statistics

SourceRank 11
Dependencies 2
Dependent projects 6
Dependent repositories 12
Total releases 6
Latest release
First release
Stars 2
Forks 0
Watchers 1
Contributors 2
Repo Size: 9.77 KB

Top Contributors See all

Luke Karrys Nathan LaFreniere

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2016-10-13 10:16:48 UTC

Login to resync this project