Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
scope.iDOMHelpers.renderArbitrary = function(child) {
const type = typeof child;
if (type === 'number' || (type === 'string' || child && child instanceof String)) {
IncrementalDOM.text(child);
} else if (type === 'function' && child.__jsxDOMWrapper) {
child();
} else if (Array.isArray(child)) {
child.forEach(scope.iDOMHelpers.renderArbitrary);
} else if (String(child) === '[object Object]') {
// Renders special incremental dom nodes in a special way :)
if (IncrementalDomRenderer.isIncDomNode(child)) {
IncrementalDomRenderer.renderChild(child);
} else {
scope.iDOMHelpers.forOwn(child, scope.iDOMHelpers.renderArbitrary);
}
} else if (!child) {
JSXRenderer.skipChild();
}
};
globals.window.iDOMHelpers.renderArbitrary = function(child) {
const type = typeof child;
if (type === 'number' || (type === 'string' || child && child instanceof String)) {
IncrementalDOM.text(child);
} else if (type === 'function' && child.__jsxDOMWrapper) {
child();
} else if (Array.isArray(child)) {
child.forEach(globals.window.iDOMHelpers.renderArbitrary);
} else if (String(child) === '[object Object]') {
// Renders special incremental dom nodes in a special way :)
if (IncrementalDomRenderer.isIncDomNode(child)) {
IncrementalDomRenderer.renderChild(child);
} else {
globals.window.iDOMHelpers.forOwn(child, globals.window.iDOMHelpers.renderArbitrary);
}
} else if (!child) {
JSXRenderer.skipChild();
}
};