Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/bundler/deps.ts>postcss.Container#walk

A Bundler with the web in mind.
Go to Latest
method postcss.Container.prototype.walk
Re-export
import { postcss } from "https://deno.land/x/bundler@0.6.2/deps.ts";
const { Container } = postcss;

Traverses the container’s descendant nodes, calling callback for each node.

Like container.each(), this method is safe to use if you are mutating arrays during iteration.

If you only need to iterate through the container’s immediate children, use Container#each.

root.walk(node => {
  // Traverses all descendant nodes.
})

Parameters

callback: (node: ChildNode, index: number) => false | void

Iterator receives each node and index.

Returns

false | undefined

Returns false if iteration was broke.