MCPcopy Index your code
hub / github.com/reactstrap/reactstrap / getTarget

Function getTarget

src/utils.js:314–329  ·  view source on GitHub ↗
(target, allElements)

Source from the content-addressed store, hash-verified

312}
313
314export function getTarget(target, allElements) {
315 const els = findDOMElements(target);
316 if (allElements) {
317 if (isArrayOrNodeList(els)) {
318 return els;
319 }
320 if (els === null) {
321 return [];
322 }
323 return [els];
324 }
325 if (isArrayOrNodeList(els)) {
326 return els[0];
327 }
328 return els;
329}
330
331export const defaultToggleEvents = ['touchstart', 'click'];
332

Callers 7

getContainerNodeFunction · 0.90
setTargetNodeFunction · 0.90
initFunction · 0.90
DropdownMenu.jsFile · 0.90
PopperTargetHelperFunction · 0.90
updateTargetFunction · 0.90
initFunction · 0.90

Calls 2

findDOMElementsFunction · 0.85
isArrayOrNodeListFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…