Skip to content

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.

License

Notifications You must be signed in to change notification settings

elonehoo/point-line

Repository files navigation

@elonehoo/point-line

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('...././.-../.-../---/--..--/.--/---/.-./.-../-../-.-.--')

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project