batch.js 413 B

1234567891011121314
  1. // Default to a dummy "batch" implementation that just runs the callback
  2. function defaultNoopBatch(callback) {
  3. callback();
  4. }
  5. var batch = defaultNoopBatch; // Allow injecting another batching function later
  6. export var setBatch = function setBatch(newBatch) {
  7. return batch = newBatch;
  8. }; // Supply a getter just to skip dealing with ESM bindings
  9. export var getBatch = function getBatch() {
  10. return batch;
  11. };