Licence
MIT
Version
0.1.1
Deps
0
Vulns
0
Weekly
0
has-class
Check whether or not an element has a class
Installation
$ npm install @f/has-class
Usage
var hasClass = require('@f/has-class')
if (hasClass('show', element)) {
removeClass('show', element)
addClass('hide', element)
}
API
hasClass(className, element)
className- The class you want to see ifelementhaselement- The element you want to check forclassName
Returns: A Boolean value indicating whether or not element has className in its class list.
License
MIT