Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elonehoo/point-line

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahs.
https://github.com/elonehoo/point-line

moss typescript vite

Last synced: 10 days ago
JSON representation

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahs.

Awesome Lists containing this project

README

        



@elonehoo/point-line

## Install

```bash
# npm
npm i @elonehoo/point-line
# yarn
yarn add @elonehoo/point-line
#pnpm
pnpm i @elonehoo/point-line
```

## Usage

```typescript
import {decode ,encode} from '@elonehoo/point-line'
// standart morse
encode('Hello, World!')

// unicode
encode('こんにちは世界!')
encode('你好,世界!')

// option
const option = {
space: ' ',
long: '-',
short: '*'
}
encode('你好,世界!', option)
```

```typescript
import {decode ,encode} from '@elonehoo/point-line'

decode('...././.-../.-../---/--..--/.--/---/.-./.-../-../-.-.--')
```