@devgrid/netron
Version:
Event bus, streams and remote object invocation.
19 lines • 511 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uid = void 0;
const common_1 = require("./common");
class Uid {
constructor(initialValue = 0) {
this.value = 0 >>> 0;
this.reset(initialValue);
}
next() {
this.value = this.value === common_1.MAX_UID_VALUE ? 1 : this.value + 1;
return this.value;
}
reset(initialValue = 0) {
this.value = initialValue >>> 0;
}
}
exports.Uid = Uid;
//# sourceMappingURL=uid.js.map
;