MCPcopy
hub / github.com/postcss/postcss / prepend

Method prepend

lib/container.js:241–254  ·  view source on GitHub ↗
(...children)

Source from the content-addressed store, hash-verified

239 }
240
241 prepend(...children) {
242 children = children.reverse()
243 for (let child of children) {
244 let nodes = this.normalize(child, this.first, 'prepend').reverse()
245 for (let node of nodes) this.proxyOf.nodes.unshift(node)
246 for (let id in this.indexes) {
247 this.indexes[id] = this.indexes[id] + nodes.length
248 }
249 }
250
251 this.markDirty()
252
253 return this
254 }
255
256 push(child) {
257 child.parent = this

Callers

nothing calls this directly

Calls 2

normalizeMethod · 0.95
markDirtyMethod · 0.80

Tested by

no test coverage detected