MCPcopy Index your code
hub / github.com/tinyplex/tinybase / toggleClass

Function toggleClass

site/js/common/common.ts:59–63  ·  view source on GitHub ↗
(
  element: HTMLElement,
  toggle: string,
  added: () => void,
)

Source from the content-addressed store, hash-verified

57 element.classList.remove(del);
58
59export const toggleClass = (
60 element: HTMLElement,
61 toggle: string,
62 added: () => void,
63) => (element.classList.toggle(toggle) ? added() : 0);
64
65export const go = (href: string, updateUrl = true): void => {
66 const nav = getNav();

Callers 1

openCloseFunction · 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…