morse-in-one

0.0.3 • Public • Published

morse-in-one

A npm package for morse code with lots of features. Encode, Decode morse code, export as JSON ot TXT files. And more....

banner

NPM npm npm GitHub Workflow Status GitHub Workflow Status (with branch) GitHub top language

Deployment Status 🚀 Netlify Status

🥰 View the npm package 👇

Install 🎉

npm install morse-in-one 

Usage 🔥

Morse Code Encode

import { mcConvert } from 'morse-in-one'
console.log(mcConvert('hello world!'))

This function will return the morse code of english words.

Output:

.... . .-.. .-.. --- / .-- --- .-. .-.. -.. -.-.--

Morse Code Decode

import { mcDecode }  from 'morse-in-one';
console.log(mcDecode('.... . .-.. .-.. --- / .-- --- .-. .-.. -.. -.-.--'))

Output:

hello world!

Morse Code Class

import { MorseCode } from 'morse-in-one';
const newObj = new MorseCode('hello');
console.log(newObj.mcCode);

Output:

.... . .-.. .-.. ---

Class Attributes :

Attribute Name Description
realStr Real input string
mcCode Morse code of input string
strLen Length of input string
mcLen Length of morse code of input string

Class Methods :

Method Description
mcConvert( ) Encode Morse Code
mcDecode( ) Decode Morse Code
mcJson( ) Return Js object of Morse Code
toJson( ) Create Json file
toTxt( ) Create Txt file
isLegit( ) Return Boolean : is it a Legit Morse code

🔢 npm package version and support

Version Support Recommended
0.0.0 module.export require
0.0.1 import export
0.0.2 import export
0.0.3 import export

For more details check the Docs

❤️ Visit the project GitHub Repository and give a star 🌟

😍 Contributors are warmly welcomed 👫

Package Sidebar

Install

npm i morse-in-one

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

151 kB

Total Files

23

Last publish

Collaborators

  • bijoykar