1.0.1 • Published 9 years ago

is-emoji-keyword v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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="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:

  • keywords: words without :. By default the value is true.
  • shortcuts: words betwen :. By default the value is true.

License

MIT © Kiko Beats