Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
AJ ONeal | e534d3a4b3 | |
AJ ONeal | 7ba1195ac5 | |
AJ ONeal | 34d8d7bbc5 | |
AJ ONeal | 7fa166802a | |
AJ ONeal | 0022ba5abe | |
AJ ONeal | 2f6f9d5e8e |
15
README.md
15
README.md
|
@ -1,6 +1,8 @@
|
||||||
forEachAsync
|
forEachAsync.js
|
||||||
===
|
===
|
||||||
|
|
||||||
|
| A [Root](https://rootprojects.org) project
|
||||||
|
|
||||||
Analogous to `[].forEach`, but handles items asynchronously with a final callback passed to `then`.
|
Analogous to `[].forEach`, but handles items asynchronously with a final callback passed to `then`.
|
||||||
|
|
||||||
This is the most essential piece of the [`ArrayAsync`](https://github.com/FuturesJS/ArrayAsync) package.
|
This is the most essential piece of the [`ArrayAsync`](https://github.com/FuturesJS/ArrayAsync) package.
|
||||||
|
@ -19,7 +21,7 @@ Straight up, that's probably a bad idea and waste of time so I hope I don't actu
|
||||||
Screencast
|
Screencast
|
||||||
---
|
---
|
||||||
|
|
||||||
<http://youtu.be/O7egvEz4scA>
|
<https://youtu.be/O7egvEz4scA>
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
@ -62,18 +64,17 @@ You can install from bower:
|
||||||
bower install --save forEachAsync@5.x
|
bower install --save forEachAsync@5.x
|
||||||
```
|
```
|
||||||
|
|
||||||
Or download the raw file from <https://raw.github.com/FuturesJS/forEachAsync/master/forEachAsync.js>:
|
Or download the raw file from <https://git.coolaj86.com/coolaj86/foreachasync.js/raw/branch/master/foreachasync.js>:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://raw.github.com/FuturesJS/forEachAsync/master/forEachAsync.js
|
wget https://git.coolaj86.com/coolaj86/foreachasync.js/raw/branch/master/foreachasync.js
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var forEachAsync = window.forEachAsync
|
var forEachAsync = window.forEachAsync;
|
||||||
;
|
|
||||||
|
|
||||||
// do stuff ...
|
// do stuff ...
|
||||||
}());
|
}());
|
||||||
|
@ -85,7 +86,7 @@ Node Installation
|
||||||
===
|
===
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install --save forEachAsync@5.x
|
npm install --save foreachasync@5.x
|
||||||
```
|
```
|
||||||
|
|
||||||
API
|
API
|
||||||
|
|
|
@ -67,17 +67,7 @@
|
||||||
try {
|
try {
|
||||||
exp.forEachAsync = create(require('bluebird'));
|
exp.forEachAsync = create(require('bluebird'));
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
try {
|
console.warn("This version of node doesn't support promises. Please `npm install --save bluebird` in your project.");
|
||||||
exp.forEachAsync = create(require('es6-promise'));
|
|
||||||
} catch(e) {
|
|
||||||
try {
|
|
||||||
exp.forEachAsync = create(require('rsvp'));
|
|
||||||
} catch(e) {
|
|
||||||
console.warn('forEachAsync needs requires a promise implementation and your environment does not provide one.'
|
|
||||||
+ '\nYou may provide your own by calling forEachAsync.create(Promise) with a PromiseA+ implementation'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"name": "foreachasync",
|
||||||
|
"version": "5.1.3",
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "foreachasync",
|
"name": "foreachasync",
|
||||||
"version": "5.1.0",
|
"version": "5.1.3",
|
||||||
"description": "A node- and browser-ready async (now with promises) counterpart of Array.prototype.forEach",
|
"description": "A node- and browser-ready async (now with promises) counterpart of Array.prototype.forEach",
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/foreachasync.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/foreachasync.js",
|
||||||
"main": "foreachasync.js",
|
"main": "foreachasync.js",
|
||||||
|
"files": [],
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://git.coolaj86.com/coolaj86/foreachasync.js.git"
|
"url": "https://git.coolaj86.com/coolaj86/foreachasync.js.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"futuresjs",
|
"futuresjs",
|
||||||
|
@ -25,11 +26,11 @@
|
||||||
"promises",
|
"promises",
|
||||||
"each"
|
"each"
|
||||||
],
|
],
|
||||||
"optionalDependencies": {
|
"trulyOptionalDependencies": {
|
||||||
"bluebird": "^3.5.1"
|
"bluebird": "^3.5.1"
|
||||||
},
|
},
|
||||||
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
|
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
|
||||||
"license": "(MIT or Apache-2.0)",
|
"license": "(MIT OR Apache-2.0)",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://git.coolaj86.com/coolaj86/foreachasync.js/issues"
|
"url": "https://git.coolaj86.com/coolaj86/foreachasync.js/issues"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue