FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

CommandBox Emoji

v1.1.0 Public

commandbox-emoji

simple emoji support for CommandBox projects

Installation

To install commandbox-emoji, you need CommandBox 🚀

Once you have that set-up, just run box install commandbox-emoji in your shell and 💥

You're now ready to use emoji in your CFML projects! Awesome! 🚀

Usage

You can use this module as a set of commands or as a library to enhance your CLI Applications.

Commands

The following are the commands registered for you:

  • emoji - Pass in a name for the emoji to render: emoji heart, emoji ❤️
  • emojify - Pass in a string with github flavored emoji markdown to translate it: I ❤️ my ☕️ !
  • unemojify - Convert an emoji enabled string to github flavored emoji markdown: I ❤️ you
  • emojimap - Prints out all the emoji's supported in this library.

Emoji Service

If you want to leverage this module as an emoji service, you can leverage the following injection: [email protected] into your CommandBox Tasks, Modules, Commands, etc. Then leverage tons of helper methods for Emoji goodness! 🚀

// Inject the emoji service
property name="emoji" inject="[email protected]";

// Use it

emoji.get( 'coffee' ) // returns the emoji code for coffee (displays emoji on terminals that support it)

emoji.which(emoji.get( 'coffee' )) // returns the string "coffee"

emoji.get( '⏩ ' ) // `.get` also supports github flavored markdown emoji (http://www.emoji-cheat-sheet.com/)

emoji.emojify( 'I ❤️  ☕️ !' ) // replaces all :emoji:   with the actual emoji, in this case: returns "I ❤️ ☕️!"

emoji.random() // returns a random emoji + key, e.g. `{ emoji: '❤️', key: 'heart' }`

emoji.search( 'cof' ) // returns an array of objects with matching emoji's. `[{ emoji: '☕️', key: 'coffee' }, { emoji: ⚰', key: 'coffin'}]`

emoji.unemojify( 'I ❤️ ?' ) // replaces the actual emoji with :emoji:  , in this case: returns "I ❤️  🍕 "

emoji.hasEmoji( '?' ) // Validate if this library knows an emoji like `?`

emoji.hasEmoji( 'pizza' ) // Validate if this library knowns a emoji with the name `pizza`

CHANGELOG

1.1.0

  • Updated to use the cbemoji library
  • Added the emojiMap command.

1.0.0

  • Initial creation of project

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
1.1.0 Mar 22 2018 11:46 AM Mar 22 2018 11:46 AM
Version History
1.0.0 Feb 14 2018 08:01 PM Feb 14 2018 08:01 PM

 

No collaborators yet.
     
  • Feb 14 2018 08:01 PM
  • Mar 22 2018 11:46 AM
  • 449
  • 0
  • 15