7 lines
143 B
TypeScript
7 lines
143 B
TypeScript
|
const gen = (function* () {
|
||
|
let index = -1
|
||
|
while (true) yield index++
|
||
|
})()
|
||
|
|
||
|
export default (pre: string = '') => `${pre}${gen.next().value}`
|