async-lock
Advanced tools
Comparing version 0.3.10 to 1.0.0
@@ -0,1 +1,6 @@ | ||
1.0.0 / 2017-06-29 | ||
================== | ||
* Remove dependency on Q by using the global Promise variable by default. Thank you @erikvold (https://github.com/erikvold) for the PR | ||
0.3.10 / 2017-06-27 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -6,3 +6,3 @@ 'use strict'; | ||
this.Promise = opts.Promise || require('q'); | ||
this.Promise = opts.Promise || Promise; | ||
@@ -243,3 +243,3 @@ // format: {key : [fn, fn]} | ||
AsyncLock.prototype._deferPromise = function() { | ||
if (typeof this.Promise.defer === "function") { | ||
if (typeof this.Promise.defer === 'function') { | ||
// note that Q does not have a constructor with reject/resolve functions so we have no option but use its defer() method | ||
@@ -246,0 +246,0 @@ return this.Promise.defer(); |
{ | ||
"name": "async-lock", | ||
"description": "Lock on asynchronous code", | ||
"version": "0.3.10", | ||
"version": "1.0.0", | ||
"author": { | ||
@@ -34,5 +34,2 @@ "name": "Rogier Schouten", | ||
}, | ||
"dependencies": { | ||
"q": "~1.5.0" | ||
}, | ||
"devDependencies": { | ||
@@ -50,4 +47,5 @@ "bluebird": "~3.5.0", | ||
"mocha": "^3.2.0", | ||
"q": "~1.5.0", | ||
"should": "~11.2.1" | ||
} | ||
} |
@@ -135,5 +135,5 @@ # async-lock | ||
// Use your own promise library instead of Q | ||
// Use your own promise library instead of the global Promise variable | ||
var lock = new AsyncLock({Promise : require('bluebird')}); // Bluebird | ||
var lock = new AsyncLock({Promise : Promise}); // Node/ES6 promise | ||
var lock = new AsyncLock({Promise : require('q')}); // Q | ||
``` | ||
@@ -140,0 +140,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13904
0
0
13