Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let typeName = type && type.raw &&
type.raw.replace('CustomPropTypes.', '');
if (type && type.name === 'shape' && type.value) {
Object.keys(type.value).forEach((key) => {
type.value[key] = setDefaults({ type: type.value[key] }, key, widgetName).type
})
}
if (defaultTypes[typeName]) {
desc.type = Object.assign({}, type, defaultTypes[typeName]);
}
if (defaultDescriptions[name]) {
let dft = defaultDescriptions[name]
if (!cleanDoclets(desc.description)) {
desc.description = dft({ name: widgetName }) + '\n' + desc.description || '';
}
}
return desc
}