Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pProps(loadedConfig).then(result => {
const config = objectMap(result, prop => prop.config);
const errors = arrFlatten(collectionMap(result, prop => prop.errors));
const error = errors.length > 0 ? new ConfigError(errors) : null;
callback(error, config);
});
}