Skip to content

dimabory/ecoji-js

Folders and files

NameName
Last commit message
Last commit date
Jun 22, 2019
Jul 27, 2018
Jul 26, 2018
Jun 22, 2019
Jun 22, 2019
Jul 26, 2018
Jul 26, 2018
Jul 26, 2018
Jul 26, 2018
Jun 22, 2019
Jul 27, 2018
Feb 1, 2019
Jul 27, 2018
Jun 22, 2019
Oct 31, 2019
Jun 22, 2019
Jun 22, 2019
Jul 26, 2018
Jul 26, 2018

Repository files navigation

ecoji-js | 1️⃣0️⃣2️⃣4️⃣ πŸ‘¨β€πŸ’»πŸ”₯#οΈβƒ£πŸŒŽπŸ›«πŸ•ΆοΈ

npm version Build Status codecov Commitizen friendly License

A JavaScript implementation of the Ecoji encoding standard. Provides a simple API to encode or/and decode data as a base-1024 sequence of emoji symbols.

Installation

# 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

const ecoji = require('ecoji-js')
const str = 'Hello World'
ecoji.encode(str)
πŸ―πŸ”©πŸš—πŸŒ·πŸ‰πŸ‘‡πŸ¦’πŸ•ŠπŸ‘‘β˜•β˜•β˜•

Decoding

const ecoji = require('ecoji-js')
const str = 'πŸ―πŸ”©πŸš—πŸŒ·πŸ‰πŸ‘‡πŸ¦’πŸ•ŠπŸ‘‘β˜•β˜•β˜•'
ecoji.decode(str)
Hello World

CLI

$ ecoji -h
Usage: ecoji [-d]

Encode or decode data as Unicode emojis. 😁

Commands:
  ecoji -d  decode emoji to string

Options:
  -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

Read more about standard by following above link.

License

This project is licensed under the terms of the Apache License 2.0.

Copyright (©️) 2019 Dmytro Borysovskyi