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

morse-module

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morse-module

[![npm](https://img.shields.io/npm/v/morse-module)](https://www.npmjs.com/package/morse-module) [![npm](https://img.shields.io/npm/dm/morse-module)](https://www.npmjs.com/package/morse-module)

latest
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

Morse Module

npm npm

This module will help you interpret Morse code into Latin text.

Installation

npm

$ npm i morse-module

Usage

const codeText = require('morse-module');
    
console.log(codeText.textToMorse('HELLO WORLD NODEJS'));
console.log(codeText.morseToText('-. --- -.. . .--- ...'));

Console

 .... . .-.. .-.. --- / .-- --- .-. .-.. -.. / -. --- -.. . .--- ...
 NODEJS

User guide

MethodDescriptionParameterReturn Value
textToMorse()convert morse code to latin textStringString
morseToText()convert latin text code to morse code, if the format of the code is invalid it will return Undefined.StringString undefined

Morse code format

  • Morse code to be interpreted into Latin must have a space between character, number or symbol.
  • To represent a space it must be expressed as: space bar space/.
  • Morse code must not contain a leading or trailing space.
  • For Morse code, it is considered invalid if there are characters other than:. (space) /.

List code suport

Latin

A.-B-...C-.-.D-..E.F..-.
G--.H....I..J.---K-.-L.-..
M--N-.O---P.--.Q--.-R.-.
S...T-U..-V...-W.--X-..-
Y-.--Z--..

Numbers

0-----1.----2..---3...--4....-5.....
6-....7--...8---..9----.

Puntuation

..-.-.-,--..--?..--..'.----.!-.-.--/-..-.
(-.--.)-.--.-&.-...:---...;-.-.-.=-...-
+.-.-.--....-_..--.-".-..-.$...-..-@.--.-.
¿..-.-¡--...-

Keywords

morse

FAQs

Package last updated on 01 May 2022

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