objss
Converts JavaScript style objects into CSS-like strings.
npm i objss
const objss = const css = // 'margin:16px;color:tomato;' const css = // 'color:tomato;&:hover{color:green;}'
What is this for?
Sometimes CSS-in-JS solutions require tagged template literals.
JavaScript object literals are often easier to work with.
This can be used in place of tagged template literals.
// The same as foo`color:tomato;`
There might be other use-cases as well.
Related:
The reverse of this:
MIT License