Class Modify
A tiny package to manage and modify HTML classes
Install
npm i class-modify
Usage
Add, remove and toggle classes
; const classes = ;console; // --> test one two threeconsole; // --> test one threeconsole; // --> test oneconsole; // --> test one three
Subscribe to changes
; const classes = ;const subscription = classes; classes; // --> This will call the subscribed callbacks subscription; // Removes the callback
Reset and reset all
classes; // Clears all the classes (subscriptions stay intact)classes; // Clears all the classes and subscriptions