A npm package for morse code with lots of features. Encode, Decode morse code, export as JSON ot TXT files. And more....
npm install morse-in-one
import { mcConvert } from 'morse-in-one'
console.log(mcConvert('hello world!'))
This function will return the morse code of english words.
Output:
.... . .-.. .-.. --- / .-- --- .-. .-.. -.. -.-.--
import { mcDecode } from 'morse-in-one';
console.log(mcDecode('.... . .-.. .-.. --- / .-- --- .-. .-.. -.. -.-.--'))
Output:
hello world!
import { MorseCode } from 'morse-in-one';
const newObj = new MorseCode('hello');
console.log(newObj.mcCode);
Output:
.... . .-.. .-.. ---
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 |
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 |
Version | Support | Recommended |
---|---|---|
0.0.0 | module.export require |
❌ |
0.0.1 | import export |
❌ |
0.0.2 | import export |
✅ |
0.0.3 | import export |
✅ |