strong-trace
Version:
StrongTrace Node.js Tracer
13 lines (10 loc) • 323 B
JavaScript
;
module.exports = RollingIntGenerator
function RollingIntGenerator(start) {
if (!(this instanceof RollingIntGenerator)) return new RollingIntGenerator(start)
this.current = start | 0
}
RollingIntGenerator.prototype.next = function next() {
this.current = (this.current + 1) | 0
return this.current
}