MCPcopy Index your code
hub / github.com/postcss/postcss / toBase64

Method toBase64

lib/map-generator.js:337–343  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

335 }
336
337 toBase64(str) {
338 if (Buffer) {
339 return Buffer.from(str).toString('base64')
340 } else {
341 return window.btoa(unescape(encodeURIComponent(str)))
342 }
343 }
344
345 toFileUrl(path) {
346 let cached = this.memoizedFileURLs.get(path)

Callers 1

addAnnotationMethod · 0.95

Calls 2

fromMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected