MCPcopy
hub / github.com/postcss/postcss / loadFile

Method loadFile

lib/previous-map.js:87–99  ·  view source on GitHub ↗
(path, cssFile, trusted)

Source from the content-addressed store, hash-verified

85 }
86
87 loadFile(path, cssFile, trusted) {
88 /* c8 ignore next 5 */
89 if (!trusted && !this.unsafeMap) {
90 if (!/\.map$/i.test(path)) {
91 return undefined
92 }
93 }
94 this.root = dirname(path)
95 if (existsSync(path)) {
96 this.mapFile = path
97 return readFileSync(path, 'utf-8').toString().trim()
98 }
99 }
100
101 loadMap(file, prev) {
102 if (prev === false) return false

Callers 1

loadMapMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected