
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
object-pool-2
Advanced tools
A constructor specific object pool implementation for asynchronous recycling of object allocations.
A constructor specific object pool implementation for asynchronous recycling of object allocations.
npm install object-pool-2 --save
var objectPool = require('object-pool-2')(Constructor);Creates a new object pool. Accepts an Constructor which will be used internally in order to instantiate new Constructor instances (via new Constructor).
objectPool.allocate(callback)Asynchronous. Allocates a new Constructor instance. This either results into a new instance being created or a previously deallocated instance being reused.
objectPool.deallocate()Deallocates a allocated Constructor instance. This enables the object to be reused if needed.
objectPool.max = 10Maximum number of internally managed Constructor instances. Defaults to 10. Will throw an error if max < inUse.
objectPool.availableRead-only. Number of available, but not necessarily allocated, Constructor instances.
objectPool.inUseRead-only. Number of internally managed allocated (therefore not de-allocated) Constructor instances.
ISC
FAQs
A constructor specific object pool implementation for asynchronous recycling of object allocations.
We found that object-pool-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.