Comparing version 1.1.0 to 1.1.1
@@ -10,5 +10,5 @@ { | ||
"scripts": [ | ||
"lib/rsvp.js" | ||
"node/rsvp.js" | ||
], | ||
"repo": "tildeio/rsvp.js" | ||
} |
{ | ||
"name": "rsvp", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A lightweight library that provides tools for organizing asynchronous code", | ||
@@ -5,0 +5,0 @@ "main": "lib/rsvp.js", |
@@ -13,3 +13,3 @@ # RSVP.js | ||
`RSVP.Promise` is an implementation of | ||
`RSVP.Promise` is an implementation of | ||
[Promises/A](http://wiki.commonjs.org/wiki/Promises/A) that passes the | ||
@@ -141,2 +141,23 @@ [promises test suite](https://github.com/domenic/promise-tests) written | ||
## Arrays of promises | ||
Sometimes you might want to work with many promises at once. If you | ||
pass an array of promises to the `all()` method it will return a new | ||
promise that will be fulfilled when all of the promises in the array | ||
have been fulfilled; or rejected immediately if any promise in the array | ||
is rejected. | ||
```javascript | ||
var postIds = [2, 3, 5, 7, 11, 13]; | ||
var promises = []; | ||
for(var i = 0; i < postIds.length; i++) { | ||
promises.push(getJSON("/post/" + postIds[i] + ".json")); | ||
} | ||
RSVP.all(promises).then(function(posts) { | ||
// posts contains an array of results for the given promises | ||
}); | ||
``` | ||
## TaskJS | ||
@@ -143,0 +164,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
4135971
94103
253
15
429