Socket
Socket
Sign inDemoInstall

generic-pool

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generic-pool - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

4

lib/Pool.js

@@ -467,4 +467,4 @@ "use strict";

*/
use(fn) {
return this.acquire().then(resource => {
use(fn, priority) {
return this.acquire(priority).then(resource => {
return fn(resource).then(

@@ -471,0 +471,0 @@ result => {

{
"name": "generic-pool",
"description": "Generic resource pooling for Node.JS",
"version": "3.7.1",
"version": "3.7.2",
"author": "James Cooper <james@bitmechanic.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -253,2 +253,3 @@ [![build status](https://secure.travis-ci.org/coopernurse/node-pool.png)](http://travis-ci.org/coopernurse/node-pool)

- `fn`: a function that accepts a `resource` and returns a `Promise`. Once that promise `resolve`s the `resource` is returned to the pool, else if it `reject`s then the resource is destroyed.
- `priority`: Optionally, you can specify the priority as number. See [Priority Queueing](#priority-queueing) section.

@@ -255,0 +256,0 @@ and returns a `Promise` that either `resolve`s with the value from the user supplied `fn` or `reject`s with an error.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc