New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

morse-code-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morse-code-js

Encrypt and Decrypt morse codes

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Morse Code Js

NPM GitHub followers npm

morse-code-js is a mini javascript library that converts a given text to morse code or a given morse code back to text.

The key is based on the table below.

International Morse Code table

Alterations

For a bit of clarity, I

  • I used * as dot and - as dash
  • Made the dash one unit instead of three
  • I used . to seperate the letters and | to seperate words.

Installation

npm install morse-code-js

Usage

const morseCode = require('morse-code-js');

morseCode.morse();
morseCode.string();
morseCode.morseSentence();
morseCode.stringSentence();

API

MethodParams
morse()Takes a stringText and converts it to a morse code. Letters seperated by .
string()Takes an existing morseText and convert it to a readable string
morseSentence()Takes a stringSentence and converts it to a morse code. Words seperated by `
stringSentence()Takes a morseSentence and converts it to a string sentence

Author

Ephraim Atta-Duncan

License

MIT

Keywords

morse

FAQs

Package last updated on 04 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts