Giter VIP home page Giter VIP logo

node-emoji's Introduction

node-emoji

NPM version (1.0.3) NPM Downloads Build Status Dependencies Code Climate https://paypal.me/DanielBugl/10 https://gratipay.com/~omnidan/

simple emoji support for node.js projects

node-emoji example

Installation

To install node-emoji, you need node.js and npm. ๐Ÿš€

Once you have that set-up, just run npm install --save node-emoji in your project directory. ๐Ÿšข

You're now ready to use emoji in your node projects! Awesome! ๐Ÿค˜

Usage

var emoji = require('node-emoji')
emoji.get('coffee') // returns the emoji code for coffee (displays emoji on terminals that support it)
emoji.which(emoji.get('coffee')) // returns the string "coffee"
emoji.get(':fast_forward:') // `.get` also supports github flavored markdown emoji (http://www.emoji-cheat-sheet.com/)
emoji.emojify('I :heart: :coffee:!') // replaces all :emoji: with the actual emoji, in this case: returns "I โค๏ธ โ˜•๏ธ!"
emoji.random() // returns a random emoji + key, e.g. `{ emoji: 'โค๏ธ', key: 'heart' }`
emoji.search('cof') // returns an array of objects with matching emoji's. `[{ emoji: 'โ˜•๏ธ', key: 'coffee' }, { emoji: โšฐ', key: 'coffin'}]`

Adding new emoji

Emoji come from js-emoji (Thanks a lot ๐Ÿ‘). You can get a JSON file with all emoji here: https://raw.githubusercontent.com/omnidan/node-emoji/master/lib/emoji.json

To update the list or add custom emoji, clone this repository and put them into lib/emojifile.js. Then run npm run-script emojiparse in the project directory or node emojiparse in the lib directory. This should generate the new emoji.json file and output Done..

That's all, you now have more emoji you can use! ๐Ÿ‘

Support / Donations

If you want to support node-emoji development, please consider donating (it helps me keeping my projects active and alive!):

  • Paypal: daniel.bugl@gmail.com
  • Gratipay: https://gratipay.com/omnidan/
  • Bitcoin: 114veSsYoyw2QrXkPTxHD51B5i39TinsBP

http://i.imgur.com/RgzXqGD.png

node-emoji's People

Contributors

omnidan avatar ngryman avatar gabrielcsapo avatar greenkeeperio-bot avatar jackiehluo avatar cooperka avatar orkon avatar histoiredebabar avatar ahanriat avatar wtgtybhertgeghgtwtg avatar

Watchers

James Cloos avatar Bogdan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.