Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-lock

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-lock - npm Package Compare versions

Comparing version 0.3.10 to 1.0.0

5

History.md

@@ -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 @@ ==================

4

lib/index.js

@@ -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

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