Returns a CSS variable string from a plain object with key-value pairs.
Remarks
This function uses Object.entries() and Array.map() to generate a string
with CSS variable declarations. The object keys are expected to be strings,
while the values can be of any type. If the input object is not a plain object,
an error is returned.
Returns a CSS variable string from a plain object with key-value pairs.
Remarks
This function uses
Object.entries()
andArray.map()
to generate a string with CSS variable declarations. The object keys are expected to be strings, while the values can be of any type. If the input object is not a plain object, an error is returned.Example
Example