mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
BREAKING(encoding/unstable): move base64-stream
module to unstable-base64-stream
(#5958)
This commit is contained in:
parent
034f3d75d3
commit
0ff29d1508
@ -45,6 +45,7 @@ const ENTRY_POINTS = [
|
||||
"../datetime/mod.ts",
|
||||
"../dotenv/mod.ts",
|
||||
"../encoding/mod.ts",
|
||||
"../encoding/unstable_base64_stream.ts",
|
||||
"../encoding/unstable_base32hex_stream.ts",
|
||||
"../encoding/unstable_base32_stream.ts",
|
||||
"../expect/mod.ts",
|
||||
|
@ -10,7 +10,7 @@
|
||||
"./unstable-base32hex-stream": "./unstable_base32hex_stream.ts",
|
||||
"./base58": "./base58.ts",
|
||||
"./base64": "./base64.ts",
|
||||
"./base64-stream": "./base64_stream.ts",
|
||||
"./unstable-base64-stream": "./unstable_base64_stream.ts",
|
||||
"./base64url": "./base64url.ts",
|
||||
"./base64url-stream": "./base64url_stream.ts",
|
||||
"./hex": "./hex.ts",
|
||||
|
@ -20,7 +20,6 @@ export * from "./base32.ts";
|
||||
export * from "./base32hex.ts";
|
||||
export * from "./base58.ts";
|
||||
export * from "./base64.ts";
|
||||
export * from "./base64_stream.ts";
|
||||
export * from "./base64url.ts";
|
||||
export * from "./base64url_stream.ts";
|
||||
export * from "./hex.ts";
|
||||
|
@ -4,6 +4,18 @@
|
||||
/**
|
||||
* Utilities for encoding and decoding to and from base64 in a streaming manner.
|
||||
*
|
||||
* ```ts
|
||||
* import { assertEquals } from "@std/assert";
|
||||
* import { Base64DecoderStream } from "@std/encoding/unstable-base64-stream";
|
||||
* import { toText } from "@std/streams/to-text";
|
||||
*
|
||||
* const stream = ReadableStream.from(["SGVsbG8s", "IHdvcmxkIQ=="])
|
||||
* .pipeThrough(new Base64DecoderStream())
|
||||
* .pipeThrough(new TextDecoderStream());
|
||||
*
|
||||
* assertEquals(await toText(stream), "Hello, world!");
|
||||
* ```
|
||||
*
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* @module
|
||||
@ -22,7 +34,7 @@ import { decodeBase64, encodeBase64 } from "./base64.ts";
|
||||
* ```ts
|
||||
* import { assertEquals } from "@std/assert";
|
||||
* import { encodeBase64 } from "@std/encoding/base64";
|
||||
* import { Base64EncoderStream } from "@std/encoding/base64-stream";
|
||||
* import { Base64EncoderStream } from "@std/encoding/unstable-base64-stream";
|
||||
* import { toText } from "@std/streams/to-text";
|
||||
*
|
||||
* const stream = ReadableStream.from(["Hello,", " world!"])
|
||||
@ -66,7 +78,7 @@ export class Base64EncoderStream extends TransformStream<Uint8Array, string> {
|
||||
* @example Usage
|
||||
* ```ts
|
||||
* import { assertEquals } from "@std/assert";
|
||||
* import { Base64DecoderStream } from "@std/encoding/base64-stream";
|
||||
* import { Base64DecoderStream } from "@std/encoding/unstable-base64-stream";
|
||||
* import { toText } from "@std/streams/to-text";
|
||||
*
|
||||
* const stream = ReadableStream.from(["SGVsbG8s", "IHdvcmxkIQ=="])
|
@ -2,7 +2,10 @@
|
||||
|
||||
import { assertEquals } from "@std/assert";
|
||||
import { encodeBase64 } from "./base64.ts";
|
||||
import { Base64DecoderStream, Base64EncoderStream } from "./base64_stream.ts";
|
||||
import {
|
||||
Base64DecoderStream,
|
||||
Base64EncoderStream,
|
||||
} from "./unstable_base64_stream.ts";
|
||||
import { RandomSliceStream } from "./_random_slice_stream.ts";
|
||||
import { toText } from "@std/streams/to-text";
|
||||
import { concat } from "@std/bytes/concat";
|
Loading…
Reference in New Issue
Block a user