Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getAlias(
prop: string,
isNative = false,
platform?: string,
type?: string
) {
if (!isNative && type) {
const hostComponent = hostComponents.get(type);
if (hostComponent?.alias?.[prop]) {
return hostComponent.alias[prop];
}
}
prop = prop.replace('className', 'class').replace('ClassName', 'Class');
if (isNative) {
return prop;
}
if (prop.startsWith('on') || prop.startsWith('catch')) {
return functionPropAlias(prop, platform);
}