0.2.0 • Published 7 years ago

async-kitty v0.2.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

async-kitty

Generator + yield 异步控制流工具集

Usage

Install

npm install async-kitty --save

Then..

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}
0.2.0

7 years ago

0.1.0

7 years ago