UNPKG

370 BJavaScriptView Raw
1// Default to a dummy "batch" implementation that just runs the callback
2function defaultNoopBatch(callback) {
3 callback()
4}
5
6let batch = defaultNoopBatch
7
8// Allow injecting another batching function later
9export const setBatch = newBatch => (batch = newBatch)
10
11// Supply a getter just to skip dealing with ESM bindings
12export const getBatch = () => batch