sosyaku

0.0.3 • Public • Published

Sosyaku

Build Status bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies

http://gifmagazine.net/post_images/488035

Promiseの重い処理を分割して再帰的に実行してくれるやつ。

Installation

npm i sosyaku -S

Usage

 
const dataList = ['https://~~~/1.jpg', ..., 'https://~~~/2000.jpg'];
 
const task = url => {
  return new Promise( (resolve, reject) => {
    generateThumbnails(url, [30, 120, 240]) // ex
    .then( result => resolve(result) )
    .catch( err => reject(err) )
  })
};
 
const params = {
  skip: 0, /* default is 0 */
  limit: 20, /* default is 20 */
  dataList: dataList,
  task: task,
};
 
new Sosyaku(params).bite().then( result => console.log(result) );
 

Readme

Keywords

Package Sidebar

Install

npm i sosyaku

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • eiurur