MCPcopy Index your code
hub / github.com/shipshapecode/tether / addClass

Function addClass

src/js/utils/classes.js:3–9  ·  view source on GitHub ↗
(el, name)

Source from the content-addressed store, hash-verified

1import { isUndefined } from './type-check';
2
3export function addClass(el, name) {
4 name.split(' ').forEach((cls) => {
5 if (cls.trim()) {
6 el.classList.add(cls);
7 }
8 });
9}
10
11/**
12 * Get class string based on previously determined classes

Callers 5

classes.spec.jsFile · 0.90
enableMethod · 0.90
_addClassesMethod · 0.90
updateClassesFunction · 0.85
drop.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…