1.1.0 • Published 2 years ago

morse-convert v1.1.0

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

Morse Alphabet Converter

You can encode, decode and hash with sha 256 by this package. You can use this also for user authentication.

Installation

Use the package manager npm to install morse-convert.

npm i morse-convert

Usage

const morse = require("morse-convert");

console.log(morse.valueToMorse("test message", String, false));
// Converting text to morse alphabet with string type.
// Output: - . ... -   -- . ... ... .- --. .

console.log(morse.valueToMorse("test message", Array, false));
// Converting text to morse alphabet with array type.
// Output: [ '- . ... -', '-- . ... ... .- --. .' ]

console.log(morse.valueToMorse("test message", String, true));
// Hashed value with morse alphabet.
// Output: b2833863f484c2386b3c13079a63fbb62d92780e394491403347e8aff312ffae

console.log(morse.morseToValue("- . ... -   -- . ... ... .- --. .", String, false));
// Converting morse to text with string type.
// Output: test message

console.log(morse.morseToValue("- . ... -   -- . ... ... .- --. .", Array, false));
// Converting morse to text with array type.
// Output: [ 'test', 'message' ]

console.log(morse.morseToValue("- . ... -   -- . ... ... .- --. .", Array, true));
// Hashed value with text.
// 190b5c60d1dcf5e362f996d9bdbc522a4c1feb92ce01b4c7ac4fad967b45ce97

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

1.1.0

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago