Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/capi/deps/std/streams.ts>ByteSliceStream

[WIP] A framework for crafting interactions with Substrate chains
Latest
class ByteSliceStream
extends TransformStream<Uint8Array, Uint8Array>
import { ByteSliceStream } from "https://deno.land/x/capi@v0.1.1-beta.1/deps/std/streams.ts";

A transform stream that only transforms from the zero-indexed start and end bytes (both inclusive).

Examples

Example 1

import { ByteSliceStream } from "https://deno.land/std@0.224.0/streams/byte_slice_stream.ts";
const response = await fetch("https://example.com");
const rangedStream = response.body!
  .pipeThrough(new ByteSliceStream(3, 8));

Constructors

new
ByteSliceStream(start?, end?)