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

css-box-shadow - Installation

To install css-box-shadow via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install css-box-shadow --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install css-box-shadow

Learn more about the config option.

PNPM

pnpm install css-box-shadow --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install css-box-shadow --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

css-box-shadow - Download

Download Tarball (v1.0.0-3)

Integrity sha512-9jaqR6e7Ohds+aWwmhe6wILJ99xYQbfmK9QQB9CcMjDbTxPZjwEmUQpU91OG05Xgm8BahT5fW+svbsQGjS/zPg==
SHASUM 9eaeb7140947bf5d649fc49a19e4bbaa5f602713
Tarball https://js.registry.sudovanilla.org/css-box-shadow/-/css-box-shadow-1.0.0-3.tgz