qalllib

1.2.1 • Public • Published

Description 3 functions to reduce the qall complexity .

qalllib.qSyncAll(functionName, arrayOfElements) qalllib.qAsyncAll(functionName, arrayOfElements) qalllib.qASyncWithBatch(functionName, arrayOfElements, batchSize)

Params: arrayOfElements: is array for which the qall has to be executed . batchSize : interger default 10 batch size is to limit the async call to batch. helps to reduce overloading.

example
pass array to add function with batch size 3

qalllib.qASyncWithBatch(add, [1,2,3,4,5], 3) .then(function (data) { console.log((new Date()).toTimeString().slice(0, 8), 'end executing:') console.log(data) }) .catch(function (error) { console.log('error in catch',error) }) .done(console.log('promise done'))

Readme

Keywords

Package Sidebar

Install

npm i qalllib

Weekly Downloads

6

Version

1.2.1

License

MIT

Unpacked Size

7.12 kB

Total Files

7

Last publish

Collaborators

  • ameychavan
  • chetan07j