MCPcopy
hub / github.com/testing-library/react-hooks-testing-library / hasDependency

Function hasDependency

src/pure.ts:8–15  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

6]
7
8function hasDependency(name: string) {
9 try {
10 require(name)
11 return true
12 } catch {
13 return false
14 }
15}
16
17function getRenderer() {
18 const validRenderer = renderers.find(({ required }) => hasDependency(required))

Callers 1

getRendererFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…