Showing 4 of 4 total issues
Function getValueFromObject
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static getValueFromObject(object: SimpleObject, key: string): string {
const keys = key.split(".").map(this.parseKey);
let track: any = object;
let prevKey: string | undefined = undefined;
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
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(tag: string, tier1?: string | Renderable | Attributes, tier2?: string | Renderable | Attributes, ...children: (Renderable|string)[]) {
super(tag);
if (isString(tier1) || isRenderable(tier1)) {
if (isString(tier1) && Element.isIdentifierString(tier1)) {
Avoid too many return
statements within this function. Open
Open
return this;