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

Percent.encode

import { Percent } from "https://raw.githubusercontent.com/i-xi-dev/bytes.es/4.4.2/deps.ts"; 

const { encode } = Percent;

Encodes the specified byte sequence into a string.

@example
Percent.encode(Uint8Array.of(0x61, 0x62, 0x0, 0xFF));
// → "%61%62%00%FF"

Percent.encode(Uint8Array.of(0x61, 0x62, 0x0, 0xFF), Percent.Options.URI_COMPONENT);
// → "ab%00%FF"
function encode(toEncode: Uint8Array, options?: Options): string;
§
encode(toEncode: Uint8Array, options?: Options): string
[src]

§Parameters

§
toEncode: Uint8Array
[src]

The byte sequence to encode.

§
options?: Options optional
[src]

The Percent.Options dictionary.

§Return Type

§
string
[src]

A string containing the Percent-encoded characters.