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

CipherChaCha20Poly1305.forEach method | Node.js crypto module | Bun

CipherChaCha20Poly1305.forEach method | Node.js crypto module | BunBuildDocsReferenceGuidesBlogDiscord/node:crypto/CipherChaCha20Poly1305/forEachMforEach

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:crypto/CipherChaCha20Poly1305/forEachMforEach

method

crypto.CipherChaCha20Poly1305.forEachforEach(fn: (data: any, options?: Abortable) => void | Promisevoid>,options?: PickReadableOperatorOptions, 'signal' | 'concurrency'>): Promisevoid>;

This method allows iterating a stream. For each chunk in the stream the fn function will be called. If the fn function returns a promise - that promise will be awaited.

This method is different from for await...of loops in that it can optionally process chunks concurrently. In addition, a forEach iteration can only be stopped by having passed a signal option and aborting the related AbortController while for await...of can be stopped with break or return. In either case the stream will be destroyed.

This method is different from listening to the 'data' event in that it uses the readable event in the underlying machinary and can limit the number of concurrent fn calls.

@param fn

a function to call on each chunk of the stream. Async or not.

@returns

a promise for when the stream has finished.

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 →

CipherChaCha20Poly1305.forEach method | Node.js crypto module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method node:crypto.CipherChaCha20Poly1305.forEach | Bun