# emojizer

> Decode your github emoji codes :wink:

Latest version **1.0.0** (published 2024-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install emojizer
pnpm add emojizer
yarn add emojizer
bun add emojizer
```

Provides the commands `emojize`, `emojizer`.

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-10-25 |
| First published | 2020-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18.18 |
| Dependencies | 5 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Adriean Khisbe |
| Maintainers | adriean.khisbe |
| Keywords | emoji, gemoji, less, shell, cli |

## Links

- npm: https://www.npmjs.com/package/emojizer
- Repository: https://github.com/AdrieanKhisbe/emojizer
- Homepage: https://github.com/AdrieanKhisbe/emojizer#readme
- Issues: https://github.com/AdrieanKhisbe/emojizer/issues
- npm.io page: https://npm.io/package/emojizer

## Dependencies (5)

- [pump](https://npm.io/package/pump.md) ^3.0.2
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [gemoji](https://npm.io/package/gemoji.md) ^8.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [multistream](https://npm.io/package/multistream.md) ^4.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-10-25
- 0.2.1 — 2020-12-27
- 0.2.0 — 2020-12-27
- 0.1.2 — 2020-12-26

## README

# emojizer

[![Npm version](https://img.shields.io/npm/v/emojizer.svg)](https://www.npmjs.com/package/emojizer)
[![Tag Version](https://img.shields.io/github/tag/AdrieanKhisbe/emojizer.svg)](https://github.com/AdrieanKhisbe/emojizer/tags)
[![Build Status](https://github.com/AdrieanKhisbe/emojizer/actions/workflows/ci.yml/badge.svg)](https://github.com/AdrieanKhisbe/emojizer/actions)
[![codecov](https://codecov.io/gh/AdrieanKhisbe/emojizer/branch/master/graph/badge.svg)](https://codecov.io/gh/AdrieanKhisbe/emojizer)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

> Turn your :emoji_codes: into thier emoji character :wink:

## About
**`emojizer`** is a program filter that turn github emoji codes into associated character.

Wanna try before install? just `npx emojizer "Try me :wave:"`,
and if you want to install an standard global install will do it: `npm install -g emojizer`

### CLI

As a pipe, just place it between your program, and your eventual pager.
You can use either `emojizer` or its alias `emojize`.

```bash
echo "Something with emojies :upside_down_face:" | emojizer
# 📺 Something with emojies 🙃

echo "Insert before your pager :pager:" | emojizer | less
```

You can also provide input as argument, either as text, either as file using the `-f`/`--file` flag

```bash
emojizer "Some string" "with or without" "emojies :slightly_smiling_face:"
# 📺 Some string
#    with or without
#    emojies 🙂
emojizer -f README.md CHANGELOG.md
# 📺 ...README then CHANGELOG with emoji code replaces
```

Using zsh, you can for instance define a global alias that combine `emojizer` and `less` or any other pager you use.
```bash
alias -g eless="emojizer|less"
# then just
git log --oneline --color | eless
```

Note that used with `git log` you might have to force color output, with `--color` flag for instance.

#### Detailed help
Just provide the `-h` or `--help` flag and you'll have the help displayed:

```
Replace your emoji codes with "real" emojies 😉

Usage:
    cat something | emojizer
    emojizer "text with :slightly_smiling_face:" ":wink:"
    emojizer -f README.md


Options:
      --version  Show version number                                   [boolean]
  -f, --file     Treat args as file to read from      [boolean] [default: false]
  -h, --help     Show help                                             [boolean]
```

### API
Internal replacing logic is exposed and so functionality can be reuse.

Provided API is so far limited, but it expose:
- a function to replace emoji code with corresponding emoji caracter: `replaceEmojiCodes`
- a function to create a `Transform` stream: `getEmojizerStream`
- the `emojiIndex` used internaly and provided by the **[`gemoji`](https://github.com/wooorm/gemoji)** library (`emoji/name-to-emoji.json`)

```js
const {replaceEmojiCodes} = require('emojizer');

console.log(replaceEmojiCodes('some text with :symbols:'));

// for getEmojizerStream, see the source or the tests 📃
```

## Miscaleanous

Original release was made under the name `emojiless` with catchphrase
> Less is more with emojies :wink:

Named was changed as `less` was misleading, program not being a pager.

---
_Source: https://npm.io/package/emojizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
