温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/zlib/Unzip/unpipe
点击访问原文链接

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

Unzip.unpipe method | Node.js zlib module | BunBuildDocsReferenceGuidesBlogDiscord/node:zlib/Unzip/unpipeMunpipe

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:zlib/Unzip/unpipeMunpipe

method

zlib.Unzip.unpipe { console.log('Stop writing to file.txt.'); readable.unpipe(writable); console.log('Manually close the file stream.'); writable.end(); }, 1000); ```" data-algolia-static="false" data-algolia-merged="false" data-type="Method">unpipe(destination?: WritableStream): this;The readable.unpipe() method detaches a Writable stream previously attached using the pipe method.

If the destination is not specified, then all pipes are detached.

If the destination is specified, but no pipe is set up for it, then the method does nothing.

import fs from 'node:fs'; const readable = getReadableStreamSomehow(); const writable = fs.createWriteStream('file.txt'); // All the data from readable goes into 'file.txt', // but only for the first second. readable.pipe(writable); setTimeout(() => { console.log('Stop writing to file.txt.'); readable.unpipe(writable); console.log('Manually close the file stream.'); writable.end(); }, 1000); @param destinationOptional specific stream to unpipe

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录