Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimabory/ecoji-js
JavaScript port of Ecoji
https://github.com/dimabory/ecoji-js
ecoji ecoji-js emoji encoding javascript typescript
Last synced: about 1 month ago
JSON representation
JavaScript port of Ecoji
- Host: GitHub
- URL: https://github.com/dimabory/ecoji-js
- Owner: dimabory
- License: apache-2.0
- Created: 2018-07-24T07:48:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-09T22:01:26.000Z (over 3 years ago)
- Last Synced: 2024-10-04T09:25:59.422Z (3 months ago)
- Topics: ecoji, ecoji-js, emoji, encoding, javascript, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ecoji-js
- Size: 810 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ecoji-js | 1️⃣0️⃣2️⃣4️⃣ 👨💻🔥#️⃣🌎🛫🕶️
[![npm version](https://badge.fury.io/js/ecoji-js.svg)](https://www.npmjs.com/package/ecoji-js)
[![Build Status](https://travis-ci.com/dimabory/ecoji-js.svg?branch=master)](https://travis-ci.com/dimabory/ecoji-js)
[![codecov](https://codecov.io/gh/dimabory/ecoji-js/branch/master/graph/badge.svg)](https://codecov.io/gh/dimabory/ecoji-js)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)A JavaScript implementation of the [Ecoji](https://github.com/keith-turner/ecoji) encoding standard. Provides a simple API to encode or/and decode data as a base-1024 sequence of emoji symbols.
## Installation
```bash
# globally
$ npm i -g ecoji-js
$ ecoji -h# locally
$ npm i -S ecoji-js
$ ./node_modules/.bin/ecoji -h
```## Usage
The library provides two public methods to encode and/or decode data:
* `encode(str: string): string`
* `decode(str: string): string`### Encoding
```js
const ecoji = require('ecoji-js')
const str = 'Hello World'
ecoji.encode(str)
```
```
🏯🔩🚗🌷🍉👇🦒🕊👡☕☕☕
```
### Decoding
```js
const ecoji = require('ecoji-js')
const str = '🏯🔩🚗🌷🍉👇🦒🕊👡☕☕☕'
ecoji.decode(str)
```
```
Hello World
```
### CLI```bash
$ ecoji -h
Usage: ecoji [-d]Encode or decode data as Unicode emojis. 😁
Commands:
ecoji -d decode emoji to stringOptions:
-d, --decode decode data [boolean] [default: false]
--version, -v Show version number [boolean]
--help, -h Show help [boolean]Examples:
echo -n 123 | ./bin/ecoji
echo 🎌🚟🎈☕ | ./bin/ecoji -d```
## [Ecoji encoding standard](https://github.com/keith-turner/ecoji/blob/master/docs/encoding.md)
Read more about standard by following above link.## License
This project is licensed under the terms of the [Apache License 2.0](LICENSE).Copyright (©️) 2019 Dmytro Borysovskyi