Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
attributes.is = (target, name, value) => {
if (target.setAttribute) applyAttr(target, name, value)
return applyProp(target, name, value)
}
attributes[symbols.default] = applyProp
attributes.is = (target, name, value) => {
if (target.setAttribute) applyAttr(target, name, value)
return applyProp(target, name, value)
}
attributes[symbols.default] = applyProp
function applyAttribute(el, name, value) {
let type = typeof value
let prop = PROPERTIES[name]
if(prop) {
applyProp(el, prop, value)
} else if (type === 'object' || type === 'function' || type == 'boolean') {
applyProp(el, name, value)
} else {
applyAttr(el, name, value)
}
}