UNPKG

cognitive-complexity-ts

Version:

This program analyses TypeScript and JavaScript code according to the [Cognitive Complexity metric](https://www.sonarsource.com/docs/CognitiveComplexity.pdf). It produces a JSON summary and a GUI for exploring the complexity of your codebase.

17 lines 543 B
import { element } from "../../framework.js"; export class FolderContents { constructor(children) { this.children = children; this.dom = element("div"); this.dom.append(...children.map(child => child.dom)); } setChildren(children) { this.children = children; this.dom.innerHTML = ""; this.dom.append(...children.map(child => child.dom)); } setOpenness(open) { this.children.forEach(child => child.setOpenness(open)); } } //# sourceMappingURL=FolderContents.js.map