Warning: SimpleXMLElement::asXML(E:\phpstudy_pro\zhutiblog\sitemaps\sitemap_54.xml.tmp): failed to open stream: Permission denied in E:\phpstudy_pro\zhutiblog\dd.php on line 1322
Unzip.compose method | Node.js zlib module | Bun - AI智能索引
温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/zlib/Unzip/compose
点击访问原文链接

Unzip.compose method | Node.js zlib module | Bun

Unzip.compose method | Node.js zlib module | BunBuildDocsReferenceGuidesBlogDiscord/node:zlib/Unzip/composeMcompose

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:zlib/Unzip/composeMcompose

method

zlib.Unzip.composecompose(stream: WritableStream | WritableStreamany> | TransformStreamany, any> | (source: any) => void,options?: Abortable): Duplex;
import { Readable } from 'node:stream';

async function* splitToWords(source) {
for await (const chunk of source) {
const words = String(chunk).split(' ');

for (const word of words) {
yield word;
}
}
}

const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
const words = await wordsStream.toArray();

console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']

readable.compose(s) is equivalent to stream.compose(readable, s).

This method also allows for an AbortSignal to be provided, which will destroy the composed stream when aborted.

See stream.compose(...streams) for more information.

@returns

a stream composed with the stream stream.

Referenced typesinterface WritableStreamW = any>readonly locked: booleanabort(reason?: any): Promisevoid>;close(): Promisevoid>;getWriter(): WritableStreamDefaultWriterW>;interface TransformStreamI = any, O = any>readonly readable: ReadableStreamO>readonly writable: WritableStreamI>

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Unzip.compose method | Node.js zlib module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method node:zlib.Unzip.compose | Bun