Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno_bundler/deps.ts>postcss.Container#walkComments

A Bundler with the web in mind.
Latest
method postcss.Container.prototype.walkComments
Re-export
import { postcss } from "https://deno.land/x/deno_bundler@v0.9.1/deps.ts";
const { Container } = postcss;

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

Like Container#each, this method is safe to use if you are mutating arrays during iteration.

root.walkComments(comment => {
  comment.remove()
})

Parameters

callback: (comment: Comment, indexed: number) => false | void

Iterator receives each node and index.

Returns

false | undefined

Returns false if iteration was broke.

Parameters

callback: (comment: Comment, indexed: number) => false | void

Returns

false | undefined