the-forest/client/node_modules/@libsql/hrana-client/lib-cjs/queue_microtask.js
2024-09-17 20:35:18 -04:00

16 lines
478 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.queueMicrotask = void 0;
// queueMicrotask() ponyfill
// https://github.com/libsql/libsql-client-ts/issues/47
let _queueMicrotask;
if (typeof queueMicrotask !== "undefined") {
exports.queueMicrotask = _queueMicrotask = queueMicrotask;
}
else {
const resolved = Promise.resolve();
exports.queueMicrotask = _queueMicrotask = (callback) => {
resolved.then(callback);
};
}