You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@filbert-js/css-ast

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filbert-js/css-ast

> CSS to AST transformer for filbert-js.

0.0.6
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@filbert-js/css-ast

CSS to AST transformer for filbert-js.

Install

yarn add @filbert-js/css-ast
// @editor
import { toAST } from '@filbert-js/css-ast';

const css = `
color: grey;
button {
    margin: 0 1rem;
    background: #1f368f;
    color: white;
    span {
        color: red;
    }
}
button,span {
    color: pink;
}
`;
const ast = toAST(css);
console.log(ast);
/**  
children: Array[2]
    0: Node
    1: Node
rules: Array[1]
    0: Object
name: "color"
value: "grey"
start: 0
end: 168
raw: "
  color: grey;
  button {
    margin: 0 1rem;
    background: #1f368f;
    color: white;
    span {
      color: red;
    }
  }
  button,
  span {
    color: pink;
  }
"
* */

More documentation is available at https://filbert-js.vercel.app.

Keywords

ast

FAQs

Package last updated on 13 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts