Kikobeats / is-emoji-keyword

Check if a word is a emoji shortcut.
MIT License
14 stars 3 forks source link

is-emoji-keyword

Build Status Dependency status Dev Dependencies Status NPM Status Gittip

Check if a word is a emoji shortcut.

Install

npm install is-emoji-keyword --save

If you want to use in the browser (powered by Browserify):

bower install is-emoji-keyword --save

and later link in your HTML:

<script src="https://github.com/Kikobeats/is-emoji-keyword/raw/master/bower_components/is-emoji-keyword/dist/is-emoji-keyword.js"></script>

Usage

var isEmoji = require('is-emoji-keyword');

isEmoji('smile');   // => true
isEmoji(':smile:'); // => true

You can provide custom options when you require the package for specify how to determine if a word is an emoji:

var isEmoji = require('is-emoji-keyword')({keywords: false, shortcuts: true});

isEmoji('smile');   // => false
isEmoji(':smile:'); // => true

options can be:

Related

License

MIT © Kiko Beats