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

vow

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vow - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

57

lib/vow.js
/**
* @module vow
* @author Filatov Dmitry <dfilatov@yandex-team.ru>
* @version 0.4.1
* @version 0.4.2
* @license

@@ -930,4 +930,6 @@ * Dual licensed under the MIT and GPL licenses:

var i = len,
onFulfilled = function() {
var i = len;
vow._forEach(
iterable,
function() {
if(!--i) {

@@ -941,8 +943,7 @@ var j = 0;

},
onRejected = function(reason) {
defer.reject(reason);
};
defer.reject,
defer.notify,
defer,
keys);
vow._forEach(iterable, onFulfilled, onRejected, keys);
return defer.promise();

@@ -987,7 +988,13 @@ },

var onProgress = function() {
var onResolved = function() {
--i || defer.resolve(iterable);
};
vow._forEach(iterable, onProgress, onProgress, keys);
vow._forEach(
iterable,
onResolved,
onResolved,
defer.notify,
defer,
keys);

@@ -1048,13 +1055,13 @@ return defer.promise();

var i = 0, reason,
onFulfilled = function(val) {
defer.resolve(val);
},
onRejected = function(e) {
var i = 0, reason;
vow._forEach(
iterable,
defer.resolve,
function(e) {
i || (reason = e);
++i === len && defer.reject(reason);
};
},
defer.notify,
defer);
vow._forEach(iterable, onFulfilled, onRejected);
return defer.promise();

@@ -1081,8 +1088,6 @@ },

iterable,
function(val) {
defer.resolve(val);
},
function(reason) {
defer.reject(reason);
});
defer.resolve,
defer.reject,
defer.notify,
defer);

@@ -1116,7 +1121,7 @@ return defer.promise();

_forEach : function(promises, onFulfilled, onRejected, keys) {
_forEach : function(promises, onFulfilled, onRejected, onProgress, ctx, keys) {
var len = keys? keys.length : promises.length,
i = 0;
while(i < len) {
vow.when(promises[keys? keys[i] : i], onFulfilled, onRejected);
vow.when(promises[keys? keys[i] : i], onFulfilled, onRejected, onProgress, ctx);
++i;

@@ -1123,0 +1128,0 @@ }

{
"name" : "vow",
"version" : "0.4.1",
"description" : "Promises/A+ proposal compatible promises library",
"version" : "0.4.2",
"description" : "DOM Promise and Promises/A+ implementation for Node.js and browsers",
"homepage" : "https://github.com/dfilatov/vow",
"keywords" : ["nodejs", "browser", "async", "promise", "a+"],
"keywords" : ["nodejs", "browser", "async", "promise", "dom", "a+"],
"author" : "Dmitry Filatov <dfilatov@yandex-team.ru>",

@@ -8,0 +8,0 @@ "contributors" : [{

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