Socket
Socket
Sign inDemoInstall

json-css

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    json-css

Utility to convert CSS to JSON and vice versa.


Version published
Maintainers
1
Install size
18.7 kB
Created

Readme

Source

JSON-CSS | CSS-JSON

Utility to convert Cascading Style Sheets (CSS) to JSON objects and vice versa.

npm version

TRY HERE

  • Yet to support media queries
  • Yet to support Files
Import:
  • Installing with NPM

      npm install json-css --save
      
    
  • Import in es6

      import JsonCSS from 'json-css';
      
    
  • Import through require in es5

      var JsonCSS = require('json-css');
      
    
Usage
  • to JSON with CSS as input type string

      JsonCSS.toJSON(`
          h1 {
              color: #F1F1F1;
          }
      `);
      
    
  • to CSS with JSON as input type object

      JsonCSS.toCSS({
          h1: {
              color: "#F1F1F1"
          }
      });
    

Keywords

FAQs

Last updated on 30 May 2017

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