Home / Function/ constructor() — fastapi Function Reference

constructor() — fastapi Function Reference

Architecture documentation for the constructor() function in termynal.js from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  2554c688_6c7a_79bc_47ad_5764d7b35209["constructor()"]
  a7203e68_a2ee_77da_beac_b0cbd8ae1a9f["lineDataToElements()"]
  2554c688_6c7a_79bc_47ad_5764d7b35209 -->|calls| a7203e68_a2ee_77da_beac_b0cbd8ae1a9f
  05632fa9_03ea_d50b_422c_62967eaa4908["loadLines()"]
  2554c688_6c7a_79bc_47ad_5764d7b35209 -->|calls| 05632fa9_03ea_d50b_422c_62967eaa4908
  b94743a8_220f_f740_a0b6_593ba25220e3["init()"]
  2554c688_6c7a_79bc_47ad_5764d7b35209 -->|calls| b94743a8_220f_f740_a0b6_593ba25220e3
  style 2554c688_6c7a_79bc_47ad_5764d7b35209 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs/en/docs/js/termynal.js lines 30–50

    constructor(container = '#termynal', options = {}) {
        this.container = (typeof container === 'string') ? document.querySelector(container) : container;
        this.pfx = `data-${options.prefix || 'ty'}`;
        this.originalStartDelay = this.startDelay = options.startDelay
            || parseFloat(this.container.getAttribute(`${this.pfx}-startDelay`)) || 600;
        this.originalTypeDelay = this.typeDelay = options.typeDelay
            || parseFloat(this.container.getAttribute(`${this.pfx}-typeDelay`)) || 90;
        this.originalLineDelay = this.lineDelay = options.lineDelay
            || parseFloat(this.container.getAttribute(`${this.pfx}-lineDelay`)) || 1500;
        this.progressLength = options.progressLength
            || parseFloat(this.container.getAttribute(`${this.pfx}-progressLength`)) || 40;
        this.progressChar = options.progressChar
            || this.container.getAttribute(`${this.pfx}-progressChar`) || '█';
		this.progressPercent = options.progressPercent
            || parseFloat(this.container.getAttribute(`${this.pfx}-progressPercent`)) || 100;
        this.cursor = options.cursor
            || this.container.getAttribute(`${this.pfx}-cursor`) || '▋';
        this.lineData = this.lineDataToElements(options.lineData || []);
        this.loadLines()
        if (!options.noInit) this.init()
    }

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the fastapi codebase.
What does constructor() call?
constructor() calls 3 function(s): init, lineDataToElements, loadLines.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free