0.0.4 • Published 2 years ago

@francisashley/lccli v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

LC lib and CLI

A tool for encoding and decoding messages.

Install

$ yarn add @francisashley/lccli --dev

CLI usage

# Basic usage
$ npx encode "HELLO WORLD"
$ npx decode "8 5 324 8748 295245 730 23 405 13122 12 108"

# LCCLI will only accept capital letters by default. This can be controlled by
# providing a custom cipher to extend (or reduce) the range of available characters.
$ npx encode "1337 speak" --cipher ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789
$ npx decode "53 55 55 59 0 45 42 31 27 37" --cipher ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789

Library usage

import lc from '@francisashley/lccli'
const encodedMessage = lc.encode('Hello World')
const decodedMessage = lc.decode(encodedMessage)

// With a custom cypher
const encodedMessage = lc.encode('1337 speak', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789')
const decodedMessage = lc.decode("53 55 55 59 0 45 42 31 27 37", 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789')