Gunzip.prependListener method | Node.js zlib module | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:zlib/
Gunzip/
prependListenerMprependListener
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:zlib/
Gunzip/
prependListenerMprependListener
method
zlib.Gunzip.prependListener {
console.log('someone connected!');
});
```
Returns a reference to the `EventEmitter`, so that calls can be chained." data-algolia-static="false" data-algolia-merged="false" data-type="Method">
prependListenerE extends keyof
DuplexEventMap>(eventName: E,listener: (...args:
DuplexEventMap[E]) => void): this;
Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.
server.prependListener('connection', (stream) => {
console.log('someone connected!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
@param eventName
The name of the event.
@param listener
The callback function
prependListener(eventName: string | symbol,listener: (...args: any[]) => void): this;
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →