@elonehoo/point-line
v0.0.6
Published
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.
Downloads
6
Readme
Install
# npm
npm i @elonehoo/point-line
# yarn
yarn add @elonehoo/point-line
#pnpm
pnpm i @elonehoo/point-line
Usage
import {decode ,encode} from '@elonehoo/point-line'
// standart morse
encode('Hello, World!')
// unicode
encode('こんにちは世界!')
encode('你好,世界!')
// option
const option = {
space: ' ',
long: '-',
short: '*'
}
encode('你好,世界!', option)
import {decode ,encode} from '@elonehoo/point-line'
decode('...././.-../.-../---/--..--/.--/---/.-./.-../-../-.-.--')