2024-05-22 02:07:38 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utilities for encoding and decoding common formats like hex, base64, and varint.
|
|
|
|
*
|
|
|
|
* ```ts
|
|
|
|
* import { encodeBase64, decodeBase64 } from "@std/encoding";
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
* import { assertEquals } from "@std/assert";
|
2024-05-22 02:07:38 +00:00
|
|
|
*
|
|
|
|
* const foobar = new TextEncoder().encode("foobar");
|
|
|
|
* assertEquals(encodeBase64(foobar), "Zm9vYmFy");
|
|
|
|
* assertEquals(decodeBase64("Zm9vYmFy"), foobar);
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* @module
|
|
|
|
*/
|
|
|
|
|
|
|
|
export * from "./ascii85.ts";
|
|
|
|
export * from "./base32.ts";
|
|
|
|
export * from "./base58.ts";
|
|
|
|
export * from "./base64.ts";
|
|
|
|
export * from "./base64url.ts";
|
|
|
|
export * from "./hex.ts";
|
2024-05-30 08:03:33 +00:00
|
|
|
export * from "./varint.ts";
|