Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/morse/mod.ts>encode

🧷 Morse Code Utilities for Deno
Latest
function encode
import { encode } from "https://deno.land/x/morse@0.1.1/mod.ts";

Encode a string into Morse code; optionally, with a custom dash.

import { encode } from "https://deno.land/x/morse/mod.ts";

encode("a")      // "._"
encode("a", { dash: "-" }) // ".-"

Parameters

text: string
optional
grammar: Grammar

Returns

string