Home / Function/ truncate() — astro Function Reference

truncate() — astro Function Reference

Architecture documentation for the truncate() function in audit-ui.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  d0e59486_d266_5fae_9fe6_c95248bcda66["truncate()"]
  d8edbadc_4bcf_95cc_05c1_73dd76db87a8["audit-ui.ts"]
  d0e59486_d266_5fae_9fe6_c95248bcda66 -->|defined in| d8edbadc_4bcf_95cc_05c1_73dd76db87a8
  67b8a6c1_a7f3_4950_fcf5_b8cd52e8a7e1["buildAuditCard()"]
  67b8a6c1_a7f3_4950_fcf5_b8cd52e8a7e1 -->|calls| d0e59486_d266_5fae_9fe6_c95248bcda66
  style d0e59486_d266_5fae_9fe6_c95248bcda66 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/apps/audit/ui/audit-ui.ts lines 13–15

function truncate(val: string, maxLength: number): string {
	return val.length > maxLength ? val.slice(0, maxLength - 1) + '…' : val;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does truncate() do?
truncate() is a function in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/ui/audit-ui.ts.
Where is truncate() defined?
truncate() is defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/ui/audit-ui.ts at line 13.
What calls truncate()?
truncate() is called by 1 function(s): buildAuditCard.

Analyze Your Own Codebase

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

Try Supermodel Free