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
  6b7d2aeb_22cc_6860_d344_4483dcb2feb2["constructor()"]
  000471a9_ef7a_d9dc_ef48_af16a8d6655c["Termynal"]
  6b7d2aeb_22cc_6860_d344_4483dcb2feb2 -->|defined in| 000471a9_ef7a_d9dc_ef48_af16a8d6655c
  d8be4d1a_8513_576d_4dde_396e61f6c933["lineDataToElements()"]
  6b7d2aeb_22cc_6860_d344_4483dcb2feb2 -->|calls| d8be4d1a_8513_576d_4dde_396e61f6c933
  ee079ce8_1e97_8b63_3228_fd451f3ef3e0["loadLines()"]
  6b7d2aeb_22cc_6860_d344_4483dcb2feb2 -->|calls| ee079ce8_1e97_8b63_3228_fd451f3ef3e0
  760e745f_41df_15c2_5b93_4b6ef98e12a2["init()"]
  6b7d2aeb_22cc_6860_d344_4483dcb2feb2 -->|calls| 760e745f_41df_15c2_5b93_4b6ef98e12a2
  style 6b7d2aeb_22cc_6860_d344_4483dcb2feb2 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()
    }

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the fastapi codebase, defined in docs/en/docs/js/termynal.js.
Where is constructor() defined?
constructor() is defined in docs/en/docs/js/termynal.js at line 30.
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