Comparing version 0.4.19 to 0.4.20
/** | ||
* @module vow | ||
* @author Filatov Dmitry <dfilatov@yandex-team.ru> | ||
* @version 0.4.19 | ||
* @version 0.4.20 | ||
* @license | ||
@@ -822,2 +822,12 @@ * Dual licensed under the MIT and GPL licenses: | ||
/** | ||
* Returns a promise, that will be fulfilled only after all the items in `iterable` are fulfilled or rejected. | ||
* | ||
* @param {Array|Object} iterable | ||
* @returns {vow:Promise} | ||
*/ | ||
allSettled : function(iterable) { | ||
return vow.allSettled(iterable); | ||
}, | ||
/** | ||
* Returns a promise, that will be fulfilled only when any of the items in `iterable` are fulfilled. | ||
@@ -1238,2 +1248,28 @@ * If any of the `iterable` items gets rejected, then the returned promise will be rejected. | ||
allSettled : function(iterable) { | ||
return vow.allResolved(iterable).then(function() { | ||
var isPromisesArray = isArray(iterable), | ||
keys = isPromisesArray? | ||
getArrayKeys(iterable) : | ||
getObjectKeys(iterable), | ||
res = isPromisesArray? [] : {}, | ||
len = keys.length, i = 0, key, value, item; | ||
while(i < len) { | ||
key = keys[i++]; | ||
promise = iterable[key]; | ||
value = promise.valueOf(); | ||
item = promise.isRejected()? | ||
{ status : 'rejected', reason : value } : | ||
{ status : 'fulfilled', value : value }; | ||
isPromisesArray? | ||
res.push(item) : | ||
res[key] = item; | ||
} | ||
return res; | ||
}); | ||
}, | ||
allPatiently : function(iterable) { | ||
@@ -1240,0 +1276,0 @@ return vow.allResolved(iterable).then(function() { |
{ | ||
"name" : "vow", | ||
"version" : "0.4.19", | ||
"description" : "DOM Promise and Promises/A+ implementation for Node.js and browsers", | ||
"homepage" : "http://dfilatov.github.io/vow/", | ||
"keywords" : ["nodejs", "browser", "async", "promise", "dom", "a+"], | ||
"author" : "Dmitry Filatov <dfilatov@yandex-team.ru>", | ||
"contributors" : [{ | ||
"name" : "Dmitry Filatov", | ||
"email" : "dfilatov@yandex-team.ru" | ||
}], | ||
"repository":{ | ||
"type" : "git", | ||
"url" : "http://github.com/dfilatov/vow.git" | ||
"name": "vow", | ||
"version": "0.4.20", | ||
"description": "DOM Promise and Promises/A+ implementation for Node.js and browsers", | ||
"homepage": "http://dfilatov.github.io/vow/", | ||
"keywords": [ | ||
"nodejs", | ||
"browser", | ||
"async", | ||
"promise", | ||
"dom", | ||
"a+" | ||
], | ||
"author": "Dmitry Filatov <dfilatov@yandex-team.ru>", | ||
"contributors": [ | ||
{ | ||
"name": "Dmitry Filatov", | ||
"email": "dfilatov@yandex-team.ru" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/dfilatov/vow.git" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"nodeunit" : "", | ||
"istanbul" : "", | ||
"uglify-js" : "1.3.4", | ||
"nodeunit": "0.11.3", | ||
"istanbul": "0.4.5", | ||
"terser": "4.0.2", | ||
"promises-aplus-tests": "2.1.0", | ||
"marked" : "0.2.10", | ||
"jspath" : "0.2.11", | ||
"yate" : "0.0.65", | ||
"highlight.js" : "7.5.0", | ||
"bem-jsd" : "1.3.1" | ||
"marked": "0.6.3", | ||
"jspath": "0.2.11", | ||
"yate": "0.0.65", | ||
"highlight.js": "7.5.0", | ||
"bem-jsd": "1.3.1" | ||
}, | ||
"license" : "MIT", | ||
"main" : "lib/vow", | ||
"engines" : { "node" : ">= 0.4.0" }, | ||
"scripts" : { | ||
"test" : "./node_modules/istanbul/lib/cli.js test test/utils/runner.js" | ||
"license": "MIT", | ||
"main": "lib/vow", | ||
"engines": { | ||
"node": ">= 0.4.0" | ||
}, | ||
"enb" : { | ||
"sources" : [ | ||
"scripts": { | ||
"test": "./node_modules/istanbul/lib/cli.js test test/utils/runner.js" | ||
}, | ||
"enb": { | ||
"sources": [ | ||
"lib/vow.js" | ||
@@ -37,0 +48,0 @@ ] |
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
62439
1288