MCPcopy
hub / github.com/flatpickr/flatpickr / findParent

Function findParent

src/utils/dom.ts:30–39  ·  view source on GitHub ↗
(
  node: Element,
  condition: (n: Element) => boolean
)

Source from the content-addressed store, hash-verified

28}
29
30export function findParent(
31 node: Element,
32 condition: (n: Element) => boolean
33): Element | undefined {
34 if (condition(node)) return node;
35 else if (node.parentNode)
36 return findParent(node.parentNode as Element, condition);
37
38 return undefined; // nothing found
39}
40
41export function createNumberInput(
42 inputClassName: string,

Callers 1

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