/is-emoji-keyword

Check if a word is a emoji shortcut.

Primary LanguageCoffeeScriptMIT LicenseMIT

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.

Related

  • emojis-list – Complete list of standard emojis.
  • emojis-keywords – Complete list of am emoji shortcuts.
  • emojis-unicode – Complete list of standard Unicode codes that represent emojis.
  • is-standard-emoji – Simply way to check if a emoji is a standard emoji.
  • trim-emoji – Deletes ':' from the begin and the end of an emoji shortcut.

License

MIT © Kiko Beats