Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function getHost(hostName) {
const env = config.environment;
hostName = isPresent(hosts.hostOverride) ? hosts.hostOverride : hostName;
if(env === 'test') {
return hosts['test'];
}
return hosts[hostName] || hosts['default'];
}
validatePropTypes (ctx) {
const disabledForEnv = settings.validate === false
const isProduction = !config || config.environment === 'production'
const settingMissing = settings.validate === undefined
if (
disabledForEnv ||
(settingMissing && isProduction)
) {
return
}
const propTypesArray = [].concat(ctx.get('propTypes'))
propTypesArray.forEach((propType) => {
if (!propType) {
return
}
Object.keys(propType).forEach(name => {