css-box-shadow
v1.0.0-3
Published
CSS box-shadow parser and stringifier
Downloads
780,558
Readme
css-box-shadow
CSS box shadow parser and stringifier
npm i css-box-shadow
const { parse, stringify } = require('css-box-shadow')
// parse a CSS string value into an array of objects
const parsed = parse('0 0 0 32px tomato')
// [{ inset: false,
// offsetX: 0,
// offsetY: 0,
// blurRadius: 0,
// spreadRadius: 32,
// color: 'tomato' }]
// convert an array of objects into a box-shadow string value
const value = stringify(parsed)
// '0 0 0 32px tomato'
MIT License