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

morse-browser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morse-browser

A simple Morse code library for browser

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

morse-browser

A simple Morse code library for browser

Samuel F.B. Morse

install

npm install morse-browser

example usage

First, include the morse.js in your html

<script src="morse.js"></script>

Then, use morse.encode to encode and morse.decode for decode


const encoded = morse.encode('Hello, world.');
// ...././.-../.-../---/--..--/......./.--/---/.-./.-../-../.-.-.-

morse.decode(encoded);
// HELLO, WORLD.
const encoded = morse.encode([ 'hello', 'world' ]);
// ["...././.-../.-../---", ".--/---/.-./.-../-.."]

morse.decode(encoded);
// [ 'HELLO', 'WORLD' ]

methods

morse.encode(obj)

Encodes and returns a given string or array

morse.decode(obj)

Decodes and returns a string or array

license

MIT

FAQs

Package last updated on 02 May 2018

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