MCPcopy
hub / github.com/postcss/postcss / previous

Method previous

lib/map-generator.js:283–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281 }
282
283 previous() {
284 if (!this.previousMaps) {
285 this.previousMaps = []
286 if (this.root) {
287 this.root.walk(node => {
288 if (node.source && node.source.input.map) {
289 let map = node.source.input.map
290 if (!this.previousMaps.includes(map)) {
291 this.previousMaps.push(map)
292 }
293 }
294 })
295 } else {
296 let input = new Input(this.originalCSS, this.opts)
297 if (input.map) this.previousMaps.push(input.map)
298 }
299 }
300
301 return this.previousMaps
302 }
303
304 setSourcesContent() {
305 let already = {}

Callers 6

applyPrevMapsMethod · 0.95
generateMapMethod · 0.95
isAnnotationMethod · 0.95
isInlineMethod · 0.95
isMapMethod · 0.95
isSourcesContentMethod · 0.95

Calls 2

walkMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected