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

rsvp

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsvp - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

LICENSE

2

component.json

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

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