Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jesselpalmer/node-emojify

Transform text into emojis :rocket:
https://github.com/jesselpalmer/node-emojify

emoji emojify emojilib emojis node-emojify

Last synced: 11 days ago
JSON representation

Transform text into emojis :rocket:

Awesome Lists containing this project

README

        

[![npm](https://img.shields.io/npm/dw/node-emojify.svg)](https://www.npmjs.com/package/node-emojify)
[![Build Status](https://travis-ci.org/jesselpalmer/node-emojify.svg?branch=master)](https://travis-ci.org/jesselpalmer/node-emojify)
[![Coverage Status](https://coveralls.io/repos/github/jesselpalmer/node-emojify/badge.svg?branch=master)](https://coveralls.io/github/jesselpalmer/node-emojify?branch=master)
[![dependencies Status](https://david-dm.org/jesselpalmer/node-emojify/status.svg)](https://david-dm.org/jesselpalmer/node-emojify)
[![devDependencies Status](https://david-dm.org/jesselpalmer/node-emojify/dev-status.svg)](https://david-dm.org/jesselpalmer/node-emojify?type=dev)

# node-emojify

Transform text into emojis 🚀.

## Goal

The goal of the project is to support all of the emojis that can be
found at [Emojipedia](https://emojipedia.org/). The shortcodes (ex. `:fire:`) that are supported are
the ones that can be found Emojipedia. If the shortcode isn't in Emojipedia, then the shortcode in
Slack are used. If the shortcode isn't in Slack, then the shortcode in GitHub is used. If the
shortcode cannot be found in Emojipedia, Slack, or GitHub, then the name of the emoji in Emojipedia is
used and underscores are used to concatenate multiple words.

## Support Status

Below is a table of the emojis that are supported by version. There may be some emojis that are
supported in the different verisons, but there hasn't been a concerted effort to add all emojis from
that version.


Verison
Status


Emoji 1.0
In development 🙂


Emoji 2.0
Not supported yet 🙁


Emoji 3.0
Not supported yet 🙁


Emoji 4.0
Not supported yet 🙁


Emoji 5.0
Not supported yet 🙁


Emoji 11.0
Not supported yet 🙁


Emoji 12.0
Not supported yet 🙁

## Installation

```bash
npm install node-emojify
```

## Usage

Text that you would like to convert into emojis must be surrounded by colons, like `:grinning:`.

```js
const emojify = require('node-emojify')

const sentence = emojify('node is :thumbsup:')

console.log(sentence)
```

Output should be `node is 👍`

If the emoji isn't supported the text will simply be ignored and not be transformed.

### Supported emojis

Supported emojis can be found in different files using the table below:



Category
Filename


🐈 Animal
animal-emojis.js


🍔 Food
food-emojis.js


🔥 Nature
nature-emojis.js


🙃 People
people-emojis.js


🗻 Travel
travel-emojis.js



If there is an emoji that you need and is not available, please file an [issue](https://github.com/jesselpalmer/node-emojify/issues) or create a [pull request](https://github.com/jesselpalmer/node-emojify/pulls).

## Tests

```bash
npm test
```

## Contributing

Pull requests are welcome! Please make sure that any new or changed functionality need to have unit tests accompanied with the PR. Make sure that you lint (`npm run lint`) and test your code (`npm test`).