UNPKG

@devgrid/netron

Version:

A powerful TypeScript library for building distributed systems with event bus, streaming capabilities, and remote object invocation. Features WebSocket-based bidirectional communication between Node.js and browser environments, service discovery, and type

19 lines 520 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Uid = void 0; const constants_1 = require("./constants"); class Uid { constructor(initialValue = 0) { this.value = 0 >>> 0; this.reset(initialValue); } next() { this.value = this.value === constants_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