Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getComponentName (componentPath) {
if (!componentPath) {
return null
}
let component = COMPONENTS.find(({ path }) => {
path = normalize(path)
return path === componentPath || path.split('.')[0] === componentPath
})
return component ? component.name : null
}function getComponentPath (componentName) {
let entry = COMPONENTS.find(({ name }) => name === componentName)
if (!entry) {
return null
}
return `veui/${COMPONENTS_DIRNAME}/${entry.path}`
}