UNPKG

@loaders.gl/polyfills

Version:

Polyfills for TextEncoder/TextDecoder

18 lines (13 loc) 409 B
// loaders.gl // SPDX-License-Identifier: MIT // Copyright vis.gl contributors // import {ReadableStreamPolyfill} from './readable-stream'; import {BlobPolyfill} from './blob'; export function instalBlobPolyfills() { if (typeof Blob === 'undefined' && !globalThis.Blob) { // @ts-ignore; globalThis.Blob = BlobPolyfill; } return globalThis.Blob; } export const Blob_ = instalBlobPolyfills();