Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

encode

import { encode } from "https://raw.githubusercontent.com/Fuwn/morse/main/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: "-" }) // ".-"
function encode(text: string, grammar?: Grammar): string;
§
encode(text: string, grammar?: Grammar): string
[src]

§Parameters

§
text: string
[src]
§
grammar?: Grammar optional
[src]

§Return Type

§
string
[src]