Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return [...attrs].reduce((str, attr) => {
if (attr.startsWith('@')) { // vue event
if (Adapter.type === BUILD_TYPES.ALIPAY) {
return str + `on${capitalize(attr.slice(1))}="eh" `
}
return str + `bind${attr.slice(1)}="eh" `
} else if (attr.startsWith('bind')) {
return str + `${attr}="eh" `
} else if (attr.startsWith('on')) {
if (Adapter.type === BUILD_TYPES.ALIPAY) {
return str + `${attr}="eh" `
}
return str + `bind${attr.slice(2).toLowerCase()}="eh" `
}
return str + `${attr}="{{ i.${attr} }}" `
}, '')
}