simpleddp-node
Version:
The aim of this library is to simplify the process of working with meteor server over DDP protocol using external JS environments
18 lines (17 loc) • 344 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateId = generateId;
exports.run = run;
let id = 0;
function generateId() {
return (id++).toString();
}
function run(runnable) {
try {
const r = runnable();
return [r, null];
}
catch (e) {
return [null, e];
}
}