generic-pool
Advanced tools
Comparing version 3.7.1 to 3.7.2
@@ -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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
399
70731
22
1369
1