silverwolf-x's picture
download
raw
440 Bytes
export function createWaiter() {
let cached = null
function wait() {
if (typeof window === 'undefined') {
if (cached) {
return cached
}
cached = new Promise((r) => process.nextTick(r))
return cached
} else {
if (cached) {
return cached
}
cached = Promise.resolve()
return cached
}
}
function cleanup() {
cached = null
}
return { wait, cleanup }
}

Xet Storage Details

Size:
440 Bytes
·
Xet hash:
67fd109637d53f79e9efb35db2d8568afe336a37a78855334e6170d6254ca24a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.