MCPcopy
hub / github.com/postcss/postcss / fromBase64

Function fromBase64

lib/previous-map.js:7–14  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

5let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
6
7function fromBase64(str) {
8 if (Buffer) {
9 return Buffer.from(str, 'base64').toString()
10 } else {
11 /* c8 ignore next 2 */
12 return window.atob(str)
13 }
14}
15
16class PreviousMap {
17 constructor(css, opts) {

Callers 1

decodeInlineMethod · 0.85

Calls 2

fromMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…