0.1.2 • Published 8 years ago

emoji-autocomplete v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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:

Find Emoji using a search term

var autocomplete = require('emoji-autocomplete');

var matchedEmoji = autocomplete.match('rent');

The result will be:

[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:

var autocomplete = require('emoji-autocomplete');

var matchedEmoji = autocomplete.match('turtle');

The result will be:

[Emoji {
    name: 'turtle', 
    emoji: '🐢' 
}]

Find the Name for an Emoji

var autocomplete = require('emoji-autocomplete');

var matchedEmoji = autocomplete.name('🏠');

The result will be:

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

License

MIT. For details, please consult LICENSE.