An IdGenerator that yields deterministic, monotonically increasing ids of the form <prefix><n> (e.g. id-1, id-2).
<prefix><n>
id-1
id-2
Primarily intended for tests and snapshots where stable, predictable ids are desirable. Not collision-resistant across separate instances.
const ids = new SequentialId('peer-')ids.next() // 'peer-1'ids.next() // 'peer-2' Copy
const ids = new SequentialId('peer-')ids.next() // 'peer-1'ids.next() // 'peer-2'
String prepended to the incrementing counter.
'id-'
Increments the internal counter and returns the next id.
The id <prefix><n>, starting at <prefix>1.
<prefix>1
An IdGenerator that yields deterministic, monotonically increasing ids of the form
<prefix><n>(e.g.id-1,id-2).Remarks
Primarily intended for tests and snapshots where stable, predictable ids are desirable. Not collision-resistant across separate instances.
Example