Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plusmancn/async-kitty
async tool kit
https://github.com/plusmancn/async-kitty
Last synced: about 1 month ago
JSON representation
async tool kit
- Host: GitHub
- URL: https://github.com/plusmancn/async-kitty
- Owner: plusmancn
- License: mit
- Created: 2016-12-13T03:07:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T06:15:54.000Z (over 7 years ago)
- Last Synced: 2024-11-18T13:05:26.987Z (about 2 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# async-kitty
> Generator + yield 异步控制流工具集## Usage
Install
```javascript
npm install async-kitty --save
```
Then..
```javascript
const asyncKitty = require('async-kitty');
```## Methods
### each
`asyncKitty.each(coll, *iteratee)`
> Applies the function iteratee to each item in coll, in parallel
```
* @param {Array} coll - 遍历集合
* @param {*Function} iteratee - 遍历函数
* @return {Array}
```### eachLimit
`asyncKitty.eachLimit(coll, limit, *iteratee)`
>The same as each but runs a maximum of limit async operations at a time.
```
* @param {Array} coll - 遍历集合
* @param {Number} limit - 单次最大并发数
* @param {*Function} iteratee - 遍历函数
* @return {Array}
```