deno/lib/base
2025-09-26 19:38:24 +02:00
..
mod.ts migrate std to jsr 2024-06-10 01:16:13 +01:00
readme.md lowercase readme 2025-09-26 19:38:24 +02:00

-/base

common encodings

import { b } from "-/base/mod.ts";

const hex = b(16, "url");

hex.e("-/base") === "2d2f62";
hex.e(cr.rand(8)) === "f01ad10f6ca4869e";

const secret_message = b(64).d("aW1wb3J0IGIgZnJvbSAiLS9iYXNlL21vZC50cyI=");
const str = new TextDecoder().decode;

secret_message instanceof Uint8Array;
str(secret_message) === `import b from "-/base/mod.ts"`;

dependencies

  • @std/encoding