Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(components).forEach(name => {
const component = importModule(components[name], name);
if (!component || !isReactComponent(component)) {
console.warn(`'${name}' is not a valid React component`);
} else {
result[name] = component;
}
});
const initProxy = proxy => importModule(proxy)();
Object.keys(componentFixtures).forEach(name => {
componentResult[name] = importModule(componentFixtures[name], name);
});