node-aggregator

1.2.2 • Public • Published

Data aggregation tool

npm version

usefull to manage cache and keed updated

Example

Basic

var sum = new Aggregator(function(new_value, memo, callback){
  callback(new_value + memo); 
}, 0);
 
sum.add(1);
console.log(sum.value()); // => 1;
sum.add(2);
console.log(sum.value()); // => 3;

Readme

Keywords

none

Package Sidebar

Install

npm i node-aggregator

Weekly Downloads

7

Version

1.2.2

License

MIT

Last publish

Collaborators

  • franckernewein