z-modifier
This module was written to handle modifier classes inspired by the BEM methodology.
Since it's a CommonJS module, it must be used alongside with Browserify, or something similar, like WebPacker.
Example, explanation
var Modifier = ; var mod = 'module' // The base class the modifier string will be attached to '--' // Modifier separator, optional '_' // Value separator, optional; mod;// -> Adds the "module--modifier" classmod;// -> true mod;// -> Replaces the "module--modifier" class with "module--modifier_value".mod;// -> 'value' mod;// Removes the "module--modifier_value" class.mod;// -> false mod;// -> Adds the "module--modifier" class.mod;// -> Removes the "module--modifier" class.