BREAKING(encoding/unstable): move base32hex-stream module to unstable-base32hex-stream (#5956)

This commit is contained in:
Asher Gomez 2024-09-12 15:45:35 +10:00 committed by GitHub
parent d5c0fdc36b
commit 034f3d75d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 17 additions and 5 deletions

View File

@ -45,6 +45,7 @@ const ENTRY_POINTS = [
"../datetime/mod.ts",
"../dotenv/mod.ts",
"../encoding/mod.ts",
"../encoding/unstable_base32hex_stream.ts",
"../encoding/unstable_base32_stream.ts",
"../expect/mod.ts",
"../fmt/bytes.ts",

View File

@ -7,7 +7,7 @@
"./base32": "./base32.ts",
"./unstable-base32-stream": "./unstable_base32_stream.ts",
"./base32hex": "./base32hex.ts",
"./base32hex-stream": "./base32hex_stream.ts",
"./unstable-base32hex-stream": "./unstable_base32hex_stream.ts",
"./base58": "./base58.ts",
"./base64": "./base64.ts",
"./base64-stream": "./base64_stream.ts",

View File

@ -18,7 +18,6 @@
export * from "./ascii85.ts";
export * from "./base32.ts";
export * from "./base32hex.ts";
export * from "./base32hex_stream.ts";
export * from "./base58.ts";
export * from "./base64.ts";
export * from "./base64_stream.ts";

View File

@ -4,6 +4,18 @@
/**
* Utilities for encoding and decoding to and from base32hex in a streaming manner.
*
* ```ts
* import { assertEquals } from "@std/assert";
* import { Base32HexDecoderStream } from "@std/encoding/unstable-base32hex-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["91IMOR3F5GG7ERRI", "DHI22==="])
* .pipeThrough(new Base32HexDecoderStream())
* .pipeThrough(new TextDecoderStream());
*
* assertEquals(await toText(stream), "Hello, world!");
* ```
*
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @module
@ -22,7 +34,7 @@ import { decodeBase32Hex, encodeBase32Hex } from "./base32hex.ts";
* ```ts
* import { assertEquals } from "@std/assert";
* import { encodeBase32Hex } from "@std/encoding/base32hex";
* import { Base32HexEncoderStream } from "@std/encoding/base32hex-stream";
* import { Base32HexEncoderStream } from "@std/encoding/unstable-base32hex-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["Hello,", " world!"])
@ -67,7 +79,7 @@ export class Base32HexEncoderStream
* @example Usage
* ```ts
* import { assertEquals } from "@std/assert";
* import { Base32HexDecoderStream } from "@std/encoding/base32hex-stream";
* import { Base32HexDecoderStream } from "@std/encoding/unstable-base32hex-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["91IMOR3F5GG7ERRI", "DHI22==="])

View File

@ -5,7 +5,7 @@ import { encodeBase32Hex } from "./base32hex.ts";
import {
Base32HexDecoderStream,
Base32HexEncoderStream,
} from "./base32hex_stream.ts";
} from "./unstable_base32hex_stream.ts";
import { RandomSliceStream } from "./_random_slice_stream.ts";
import { toText } from "@std/streams/to-text";
import { concat } from "@std/bytes/concat";