# morse-to-chain

> convert from string to morse code and vice versa

Latest version **1.3.0** (published 2022-12-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install morse-to-chain
pnpm add morse-to-chain
yarn add morse-to-chain
bun add morse-to-chain
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-12-21 |
| First published | 2022-12-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | vladimir maidana |
| Maintainers | 96vladi |

## Links

- npm: https://www.npmjs.com/package/morse-to-chain
- npm.io page: https://npm.io/package/morse-to-chain

## Recent versions

- 1.3.0 (latest) — 2022-12-21
- 1.2.0 — 2022-12-21
- 1.1.0 — 2022-12-21
- 1.0.0 — 2022-12-21

## README

<h1 align="center">
   MORSE CODE
</h1>

<p align="center">converter of text strings to morse and vice versa</p>
<p align="center">Vladimir Maidana Acarapi</p>

<p align="center">
    <b>URL LIBRARY</b> •
    <a href="https://www.npmjs.com/package/morse-to-chain"><b>https://www.npmjs.com/package/morse-to-chain</b></a>
</p>

<div align="center">
</div>

## Table of Contents

  - [Features](#features)
  - [Installing](#installing)
    - [Package manager](#package-manager)
  - [Example](#example)
  - [Additional resources](#additional-resources)
  - [Resources](#resources)
  - [Credits](#credits)

## Features

- Do text to morse code conversions
- Supports letters numbers and symbols
- Text type responses are in upper case
- Text entries can be upper or lower case
- If the translation of a character to Morse code is not found, it will be returned as an UNDEFINED response.
- You can add the translation of a code if it were missing

## Installing

### Package manager

Using npm:

```bash
$ npm install morse-to-chain
```

Using bower:

```bash
$ bower install morse-to-chain
```

Using yarn:

```bash
$ yarn add morse-to-chain
```

Using pnpm:

```bash
$ pnpm add morse-to-chain
```

Once the package is installed, you can import the library using `require` and destructure the list data, approach:

```js
const [convertToMorse, convertToText, addElementCode] = require("morse-to-chain");
```

you can also use split import:

```js
const morseCodeMethods = require("morse-to-chain");
const convertToMorse = morseCodeMethods[0];
const convertToText = morseCodeMethods[1];
const addElementCode = morseCodeMethods[2];
;
````

## Example

> **Note** CommonJS usage
> Note using CommonJS, you will be using `require()`, use the following approach:

```js
const [convertToMorse, convertToText] = require("morse-to-chain");

// performs the conversion of a text string to morse code
convertToMorse('HELLO WORLD');
//Output ('.... . .-.. .-.. --- / .-- --- .-. .-.. -..');

// performs the conversion of a morse code to a text string
convertToText('-. --- -.. . .--- ...')
//Output (NODEJS);
```
## additional-resources

MorseCode includes a method so you can add morse codes that are not registered, use the following approach.

```js
const [convertToMorse, convertToText] = require("morse-to-chain");
// performs the conversion of a text string to morse code
convertToMorse('HELLO ❄ ❄');
//Output (the value ( ❄ ) does not have a morse translation if you want you can add it to the list);
```
then

```js
const [convertToMorse, convertToText, addElementCode] = require("morse-to-chain");
// we add the element together with its morse code
// first parameter: element
// second parameter: morse code
addElementCode('❄', 'codeMorse');

convertToMorse('HELLO ❄ ❄');
//Output (.... . .-.. .-.. --- / codeMorse / codeMorse)
```
## Author
VLADIMIR MAIDANA ACARAPI

---
_Source: https://npm.io/package/morse-to-chain · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
