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

Emoji Module

cbemoji

simple emoji support for ColdBox projects

Installation

To install cbemoji, you need CommandBox 🚀

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

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

Usage : Emoji Service

There is one model library that will be mapped via WireBox as [email protected], which will give you all the methods you might need 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.0.2

  • ACF fixes
  • Test harness

1.0.1

  • Added accessors to service

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 Download
1.1.0+11 Mar 27 2018 02:28 PM Mar 27 2018 02:28 PM Ortus Solutions (ortus)
1.1.0-snapshot Mar 27 2018 02:08 PM Mar 27 2018 02:08 PM Ortus Solutions (ortus)
1.0.1 Mar 22 2018 11:34 AM Mar 22 2018 11:34 AM Ortus Solutions (ortus)
1.0.0 Mar 22 2018 11:25 AM Mar 22 2018 11:25 AM Ortus Solutions (ortus)

 

No collaborators yet.
     
  • Mar 22 2018 11:25 AM
  • Mar 27 2018 02:28 PM
  • 368
  • 378
  • 6740