MCPcopy
hub / github.com/postcss/postcss / removeChild

Method removeChild

lib/container.js:271–287  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

269 }
270
271 removeChild(child) {
272 child = this.index(child)
273 this.proxyOf.nodes[child].parent = undefined
274 this.proxyOf.nodes.splice(child, 1)
275
276 let index
277 for (let id in this.indexes) {
278 index = this.indexes[id]
279 if (index >= child) {
280 this.indexes[id] = index - 1
281 }
282 }
283
284 this.markDirty()
285
286 return this
287 }
288
289 replaceValues(pattern, opts, callback) {
290 if (!callback) {

Callers 1

normalizeMethod · 0.45

Calls 2

indexMethod · 0.95
markDirtyMethod · 0.80

Tested by

no test coverage detected