Socket
Socket
Sign inDemoInstall

js-css-parser

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    js-css-parser

A simple CSS parser for JS


Version published
Weekly downloads
16
increased by220%
Maintainers
1
Install size
4.74 kB
Created
Weekly downloads
 

Readme

Source

JSCSSParser

A simple JS function which converts CSS code (as a string) to a javascript object

Getting Started

import JSCSSParser into your project.

npm i --save js-css-parser

Pass in CSS as a string and get a JS object returned.

Object Format

Example

With this as input

body { color: red }

Expect this as a result

[
    {
        selector: "body", 
        declarations: [
            {
                property: "color", 
                value: "red"
            }
        ]
    }
]

Keywords

FAQs

Last updated on 21 Jan 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc