Predictable id generator for tests. Counts up from seed (prefix_1, prefix_2, ...), so a test produces the same ids every run. The counter is shared across prefixes: it increments on every call, whatever the prefix.
seed
prefix_1
prefix_2
const ids = sequentialIds();ids.next('txn'); // 'txn_1'ids.next('evt'); // 'evt_2' — one counter, not one per prefix Copy
const ids = sequentialIds();ids.next('txn'); // 'txn_1'ids.next('evt'); // 'evt_2' — one counter, not one per prefix
Predictable id generator for tests. Counts up from
seed(prefix_1,prefix_2, ...), so a test produces the same ids every run. The counter is shared across prefixes: it increments on every call, whatever the prefix.