Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
postcss-values-parser
node v11.15.0
version:
master
endpoint
share
tweet
const Parser = require("postcss-values-parser"); const source = '/*1*/ 5px /* 2 */'; const ast = new Parser(source).parse(); console.log('Start') ast.first.walkComments(node => { console.log(node.value); }); console.log('End')
console.log('Start') ast.first.walk(node => { node.type === 'comment' && console.log(node.value); }); console.log('End')
Loading…
no comments
sign in
to comment