0.0.3 • Published 6 years ago

batchinator v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

batchinator

Group method calls within the same tick

Install

$ yarn add batchinator

Usage

import batchinator from 'batchinator';

const load = batchinator((keys: string[]) => {
  return new Promise<string[]>(resolve => {
    const newIds = ids.map(id => `${id}-foo`);

    resolve(newIds);
  });
});

load(1);
load(2);
0.0.3

6 years ago