Autocomplete words into emojis (turn "rent" into ":house: :money_with_wings:")
npm install emoji-autocomplete:card_index: A small Node Library with zero production dependencies, turning words into emojis (turn rent into :house: :money_with_wings:). The API is quite simple:
JS
var autocomplete = require('emoji-autocomplete');var matchedEmoji = autocomplete.match('rent');
`The result will be:
`JS
[ComplexEmoji {
name: 'rent',
emoji: '🏠💸',
isComplex: true,
content: [
Emoji { name: 'house', emoji: '🏠' },
Emoji { name: 'money_with_wings', emoji: '💸' }
]
}]
`This also works with 'simple' Emoji, consisting of only one Emoji:
`JS
var autocomplete = require('emoji-autocomplete');var matchedEmoji = autocomplete.match('turtle');
`The result will be:
`JS
[Emoji {
name: 'turtle',
emoji: '🐢'
}]
`$3
`JS
var autocomplete = require('emoji-autocomplete');var matchedEmoji = autocomplete.name('🏠');
`The result will be:
`JS
Emoji {
name: 'house',
emoji: '🏠'
}
`CLI Tools
This script comes with a few CLI tools for developers: *
npm run search SEARCHTERM - Search for an Emoji
* npm run add NAME EMOJI - Add a new Emoji Combination
* npm run test - Run Unit Tests
* npm run parse - Execute the Parser, turning source.js into the JSON-file used by this package$3
MIT. For details, please consult LICENSE`.