Convert CSS <> JSON for use as custom styles in a Donately Donation Form
npm install @dntly/cssjsonFor use as custom styles in a Donately Donation Form from Donately
```
npm install @dntly/cssjson
`js
const DntlyCssJson = require('@dntly/cssjson')
const CssJson = new DntlyCssJson()
const myCss = body {
font-weight: bold
}
h1 {
font-size: 2em
}
const convertedJson = CssJson.toJSON(myCss)
// returns JSON
console.log('convertedJson:', convertedJson)
const myJson = { body: { 'font-weight': 'bold' }, h1: { 'font-size': '2em' } }
const convertedCss = CssJson.toCSS(myJson)
// returns CSS
console.log(convertedCss: ${convertedCss})
const malformedCss = .unfinished {
const parseError = CssJson.validateInput(malformedCss)
// returns 'Unclosed block'
console.log(parseError: ${parseError})``