MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / w

Function w

benchmark/data-min.js:112–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 }
111}
112let w = () => {
113 throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
114};
115typeof window < 'u' && typeof window.btoa == 'function'
116 ? (w = (l) => window.btoa(unescape(encodeURIComponent(l))))
117 : typeof Buffer == 'function' && (w = (l) => Buffer.from(l, 'utf-8').toString('base64'));

Callers 1

toUrlMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected