Skip to content

😏 simple emoji support for ColdBox projects

Notifications You must be signed in to change notification settings

coldbox-modules/cbemoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Copyright Since 2005 ColdBox Platform by Luis Majano and Ortus Solutions, Corp
www.coldbox.org | www.ortussolutions.com


πŸ’₯ Welcome to the cbemoji module πŸš€

This module allows you to use emojis in your ColdBox applications by using the emoji service. This service allows you to get emojis by name, by code, search for emojis, replace emojis in strings, and much more.

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 EmojiService@cbemoji, which will give you all the methods you might need for emoji goodness πŸš€

// Inject the emoji service
property name="emoji" inject="emojiService@cbemoji";

// 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( ':fast_forward:' ) // `.get` also supports github flavored markdown emoji (http://www.emoji-cheat-sheet.com/)

emoji.emojify( 'I :heart: :coffee:!' ) // 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 :heart: :pizza:"

emoji.hasEmoji( 'πŸ•' ) // Validate if this library knows an emoji like `πŸ•`

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

About

😏 simple emoji support for ColdBox projects

Resources

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published