MCPcopy Index your code
hub / github.com/IABTechLab/uid2docs / isInputElement

Function isInputElement

src/utils/index.ts:9–17  ·  view source on GitHub ↗
(element: Node)

Source from the content-addressed store, hash-verified

7 : string;
8
9export const isInputElement = (element: Node) => {
10 const inputTagTypes = ["input", "textarea", "select", "checkbox"];
11 const castElement = element as Element;
12
13 return (
14 isNonEmptyString(castElement?.tagName) &&
15 inputTagTypes.includes(castElement.tagName.toLowerCase())
16 );
17};
18
19export const identifyClosestSiblingInput = (
20 node: Node,

Callers 1

Calls 1

isNonEmptyStringFunction · 0.85

Tested by

no test coverage detected