Check if a word is a emoji shortcut.
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>
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:
:
. By default the value is true
.:
. By default the value is true
.MIT © Kiko Beats