Skip to content

Plugin to convert from text smile to emoticons. Emoji from punctuation

License

Notifications You must be signed in to change notification settings

samyok/smile2emoji

 
 

Repository files navigation

Smile2Emoji NPM Module

npm version Build Status FOSSA Status dependencies Status devDependencies Status License: MIT Maintainability

Convert all the smiley to fantastic emoticons!

With this simple and little module you can convert the smiles in your text to emoji. :) or :D or <3 will become emoticons! Ideal for input, chats and so on, where you don't want an emoji picker but a simpler solution.

Happy usage =)

Installation

npm i smile2emoji

Usage

Right now, there are 2 simple ways to use it.

With the function to get the data from the map:

import { checkText } from 'smile2emoji'

...

const text = checkText(':)');
console.log(text) //prints '😊'

//OR 

const text = checkText('i like bananas :)');
console.log(text) //prints 'i like bananas 😊'

Or from the map:

import { emojiMap } from 'smile2emoji'

...

const text = ':)';
const emoji = emojiMap[text];
console.log(emoji) //prints '😊'

License

MIT © Federico Ballarini

FOSSA Status

About

Plugin to convert from text smile to emoticons. Emoji from punctuation

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%