src/elements/Element.ts
Function setAttribute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setAttribute(name: string, value: Attribute): Element {
// If the attribute is an array like: [true, 'trueAttr', 'falseAttr']
// Then if true, use: 'trueAttr", else use: 'falseAttr'
if (Array.isArray(value)) {
// If the boolean element is true
Avoid too many return
statements within this function. Open
Open
return this;