MCPcopy
hub / github.com/flatpickr/flatpickr / toggleClass

Function toggleClass

src/utils/dom.ts:1–8  ·  view source on GitHub ↗
(
  elem: HTMLElement,
  className: string,
  bool: boolean
)

Source from the content-addressed store, hash-verified

1export function toggleClass(
2 elem: HTMLElement,
3 className: string,
4 bool: boolean
5) {
6 if (bool === true) return elem.classList.add(className);
7 elem.classList.remove(className);
8}
9
10export function createElement<T extends HTMLElement>(
11 tag: keyof HTMLElementTagNameMap,

Callers 4

buildFunction · 0.90
createDayFunction · 0.90
setFunction · 0.90
positionCalendarFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…