MCPcopy Create free account
hub / github.com/ctrlplusb/react-tree-walker / safeVisitor

Function safeVisitor

src/index.js:94–101  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

92) {
93 return new Promise((resolve, reject) => {
94 const safeVisitor = (...args) => {
95 try {
96 return visitor(...args)
97 } catch (err) {
98 reject(err)
99 }
100 return undefined
101 }
102
103 const recursive = (currentElement, currentContext) => {
104 if (Array.isArray(currentElement)) {

Callers 2

recursiveFunction · 0.85
visitCurrentElementFunction · 0.85

Calls 1

visitorFunction · 0.85

Tested by

no test coverage detected