1.0.1 • Published 5 years ago

emoji-translator v1.0.1

Weekly downloads
19
License
MIT
Repository
github
Last release
5 years ago

emoji-translator

Build Status Coverage Status

NPM version NPM downloads MIT License

Installation

npm i emoji-translator -S

Live demo

API

Table of Contents

create

Create a translator function that can be used to replace the emoji

Parameters

  • vocabulary Object emoji vocabulary map

Examples

import translator from 'emoji-translator';

const vocabulary = { '🍏': 'Apple', '🍋': 'Lemon', '🍌': 'Banana' };
const translate = translator(vocabulary)
const string = translate('A 🍌 is normally sweeter than an 🍏')

console.log(string) // A Banana is normally sweeter than an Apple

Returns Function the translation function converting strings containing emoji to plain text

1.0.1

5 years ago

1.0.0

6 years ago

0.0.0

6 years ago