util/classname

A utility function for creating classnames from a string, array, or classname-to-boolean map.

(require("util/classname"))(classname) → {string}

A utility function for creating classnames from a string, array, or classname-to-boolean map.
Source:
Parameters:
Name Type Description
classname string | Array | Object A class name string, an array of class names, or a plain object whose keys are possible class names and values are booleans that indicate whether the class name is active.
Throws:
The input classname is neither a string, an array, or a plain object.
Type
Error
Returns:
Type:
string
The class name string.