2.1.5 • Published 7 months ago
retmorse v2.1.5
retmorse .-. . - -- --- .-. ... .
Tradutor de código morse.
Como instalar
Instalar:
npm install retmorse
Usar:
import { retmorse } from "retmorse";
console.log(retmorse.toMorse("lorem ipsum"));
// output: .-.. --- .-. . -- / .. .--. ... ..- --
console.log(retmorse.toTxt(".-.. --- .-. . -- / .. .--. ... ..- --"));
// output: lorem ipsum
Como é traduzido
Caractere | Código Morse |
---|---|
a | .- |
b | -... |
c | -.-. |
d | -.. |
e | . |
f | ..-. |
g | --. |
h | .... |
i | .. |
j | .--- |
k | -.- |
l | .-.. |
m | -- |
n | -. |
o | --- |
p | .--. |
q | --.- |
r | .-. |
s | ... |
t | - |
u | ..- |
v | ...- |
w | .-- |
x | -..- |
y | -.-- |
z | --.. |
0 | ----- |
1 | .---- |
2 | ..--- |
3 | ...-- |
4 | ....- |
5 | ..... |
6 | -.... |
7 | --... |
8 | ---.. |
9 | ----. |
. | .-.-.- |
, | --..-- |
? | ..--.. |
' | .----. |
! | -.-.-- |
( | -.--. |
) | -.--.- |
& | .-... |
: | ---... |
; | -.-.-. |
= | -...- |
+ | .-.-. |
- | -....- |
_ | ..--.- |
" | .-..-. |
$ | ...-..- |
@ | .--.-. |
(espaço) | / |
/ | (espaço) |