Skip to content

edwilliams/css-to-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS to JS

Convert a CSS class with its styles into a JavaScript object

Install

$ npm install css-to-javascript --save

Usage

import csstojs from 'css-to-js'

var str = `
.header {
  background: red;
  border-top: 1px solid blue;
}
`
csstojs(str)
// => { header: { background: 'red', borderTop: '1px solid blue' } }

License

MIT © Ed Williams

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published