data-provider-temporary
Version:
Library that helps with server-to-client synchronization of data
23 lines (20 loc) • 370 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.assert = assert;
function assert(assertion, message) {
if (!assertion) {
throw new Error(message);
}
}
class IdGenerator {
constructor() {
this.counter = 0;
}
next() {
this.counter += 1;
return `#${this.counter}`;
}
}
exports.IdGenerator = IdGenerator;