Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
parse
✓ import { parse } from 'css-box-shadow'
✗ import parse from 'css-box-shadow'
Named export; default export is not available.
stringify
✓ import { stringify } from 'css-box-shadow'
✗ import { stringify } from 'css-box-shadow'; const { stringify } = require('css-box-shadow')
Also works with CommonJS require(). Both ESM and CJS are supported.
parse (CommonJS)
✓ const { parse } = require('css-box-shadow')
✗ const parse = require('css-box-shadow').default
No default export; destructure the required object.
Parses a CSS box-shadow string into an array of objects, then stringifies it back.
import { parse, stringify } from 'css-box-shadow';
const shadowString = '0 0 0 32px tomato';
const parsed = parse(shadowString);
console.log(parsed);
// [{ inset: false, offsetX: 0, offsetY: 0, blurRadius: 0, spreadRadius: 32, color: 'tomato' }]
const reconstructed = stringify(parsed);
console.log(reconstructed);
// '0 0 0 32px tomato'
Errors
Common errors & fixes
Cannot read properties of undefined (reading 'match')
Passing a non-string value to parse().
fixAlways pass a string: const result = parse(String(value));
TypeError: stringify is not a function
Attempting to call stringify as default import.
fixUse named import: import { stringify } from 'css-box-shadow' Audit
Dependencies
No dependency data recorded yet.