mongodb-schema
Version:
Infer the probabilistic schema for a MongoDB collection.
13 lines • 582 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.allowAbort = exports.ALLOW_ABORT_INTERVAL_COUNT = void 0;
exports.ALLOW_ABORT_INTERVAL_COUNT = 1000;
async function allowAbort(signal) {
return new Promise((resolve, reject) => setTimeout(() => {
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
return reject((signal === null || signal === void 0 ? void 0 : signal.reason) || new Error('Operation aborted'));
resolve();
}));
}
exports.allowAbort = allowAbort;
//# sourceMappingURL=util.js.map