1.0.2 • Published 9 years ago

resolveall v1.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

resolveall

Resolves all promises, breaking chain if needed.

npm install resolveall
```js

## Example

Executes promise like functions using a chain. If one of the promises is broken, execution is terminated.


```js
var a = function(resolve, reject) {
	console.log("Executing a")
	return resolve("a")
};
var b = function(resolve, reject) {
	console.log("Executing b")
	return reject("error")
};

var c = function(resolve, reject) {
	console.log("Executing c ", this)
	return resolve("c")
};
resolveall.chain([a, b, c], this).then(function(res) {
	console.log(res);
}).catch(function(e) {
	console.log("Error", e);
})