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

IncomingMessage.find method | Node.js http module | Bun

IncomingMessage.find method | Node.js http module | BunBuildDocsReferenceGuidesBlogDiscord/node:http/IncomingMessage/findMfind

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:http/IncomingMessage/findMfind

method

http.IncomingMessage.findfindT>(fn: (data: any, options?: Abortable) => data is T,options?: PickReadableOperatorOptions, 'signal' | 'concurrency'>): Promiseundefined | T>;This method is similar to Array.prototype.find and calls fn on each chunk in the stream to find a chunk with a truthy value for fn. Once an fn call's awaited return value is truthy, the stream is destroyed and the promise is fulfilled with value for which fn returned a truthy value. If all of the fn calls on the chunks return a falsy value, the promise is fulfilled with undefined.

@param fna function to call on each chunk of the stream. Async or not.

@returnsa promise evaluating to the first chunk for which fn evaluated with a truthy value, or undefined if no element was found.

find(fn: (data: any, options?: Abortable) => boolean | Promiseboolean>,options?: PickReadableOperatorOptions, 'signal' | 'concurrency'>): Promiseany>;This method is similar to Array.prototype.find and calls fn on each chunk in the stream to find a chunk with a truthy value for fn. Once an fn call's awaited return value is truthy, the stream is destroyed and the promise is fulfilled with value for which fn returned a truthy value. If all of the fn calls on the chunks return a falsy value, the promise is fulfilled with undefined.

@param fna function to call on each chunk of the stream. Async or not.

@returnsa promise evaluating to the first chunk for which fn evaluated with a truthy value, or undefined if no element was found.

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 →

智能索引记录