package
Cross-browser element class list
npm install component-classesGitHub-flavored package documentation.
Across all versions, last 30 days.
2,925,008 in 30 days
Runtime metadata.
Tagged topics.
Cross-browser element class manipulation, utilizing the native .classList when possible. This is not designed to be a .classList polyfill.
$ component install component/classesvar classes = require('classes');
classes(el)
.add('foo')
.toggle('bar')
.remove(/^item-\d+/);Add class.
Remove class name or all classes matching the given regular expression.
Toggle class.
Check if class is present.
Return an array of classes.
$ make testMIT
defunctzombie
shtylman@gmail.com
tjholowaychuk
tj@vision-media.ca
rauchg
rauchg@gmail.com
retrofox
rdsuarez@gmail.com
coreh
thecoreh@gmail.com
forbeslindesay
forbes@lindesay.co.uk
kelonye
kelonyemitchel@gmail.com
yields
yields@icloud.com
anthonyshort
antshort@gmail.com
ianstormtaylor
ian@ianstormtaylor.com
cristiandouce
cristiandouce@gmail.com
swatinem
arpad.borsos@googlemail.com
stagas
gstagas@gmail.com
amasad
amjad.masad@gmail.com
juliangruber
julian@juliangruber.com
calvinfo
calvin@calv.info
dominicbarnes
dominic@dbarnes.info
jongleberry
jonathanrichardong@gmail.com
timoxley
secoif@gmail.com
jonathanong
jonathanrichardong@gmail.com
queckezz
fabian.eichenberger@gmail.com
nami-doc
vendethiel@hotmail.fr
clintwood
clint@anotherway.co.za
thehydroimpulse
dnfagnan@gmail.com
stephenmathieson
me@stephenmathieson.com
trevorgerhardt
trevorgerhardt@gmail.com
timaschew
timaschew@gmail.com
tootallnate
nathan@tootallnate.net
hughsk
hughskennedy@gmail.com