the-forest/client/node_modules/@libsql/hrana-client/lib-esm/queue_microtask.js

14 lines
364 B
JavaScript
Raw Normal View History

2024-09-17 20:35:18 -04:00
// queueMicrotask() ponyfill
// https://github.com/libsql/libsql-client-ts/issues/47
let _queueMicrotask;
if (typeof queueMicrotask !== "undefined") {
_queueMicrotask = queueMicrotask;
}
else {
const resolved = Promise.resolve();
_queueMicrotask = (callback) => {
resolved.then(callback);
};
}
export { _queueMicrotask as queueMicrotask };