MCPcopy Index your code
hub / github.com/component/classes

github.com/component/classes @1.2.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.2.6 ↗ · + Follow
1 symbols 1 edges 2 files 1 documented · 100%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

classes

Cross-browser element class manipulation, utilizing the native .classList when possible. This is not designed to be a .classList polyfill.

Installation

$ component install component/classes

Example

var classes = require('classes');
classes(el)
  .add('foo')
  .toggle('bar')
  .remove(/^item-\d+/);

API

.add(class)

Add class.

.remove(class)

Remove class name or all classes matching the given regular expression.

.toggle(class)

Toggle class.

.has(class)

Check if class is present.

.array()

Return an array of classes.

Test

$ make test

License

MIT

Core symbols most depended-on inside this repo

ClassList
called by 0
index.js

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

index.js1 symbols

For agents

$ claude mcp add classes \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact