Home / File/ utils.ts — ui Source File

utils.ts — ui Source File

Architecture documentation for utils.ts, a typescript file in the ui codebase. 2 imports, 0 dependents.

File typescript ComponentRegistry Styles 2 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  7ba0a860_211a_9e4e_06e4_eab77857854a["utils.ts"]
  32072d07_3a34_f8e7_74a3_92d60468563d["clsx"]
  7ba0a860_211a_9e4e_06e4_eab77857854a --> 32072d07_3a34_f8e7_74a3_92d60468563d
  8f0d50d6_7103_5a47_9ef1_514d68c80604["tailwind-merge"]
  7ba0a860_211a_9e4e_06e4_eab77857854a --> 8f0d50d6_7103_5a47_9ef1_514d68c80604
  style 7ba0a860_211a_9e4e_06e4_eab77857854a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

export function formatDate(input: string | number): string {
  const date = new Date(input)
  return date.toLocaleDateString("en-US", {
    month: "long",
    day: "numeric",
    year: "numeric",
  })
}

export function absoluteUrl(path: string) {
  return `${process.env.NEXT_PUBLIC_APP_URL}${path}`
}

Subdomains

Dependencies

  • clsx
  • tailwind-merge

Frequently Asked Questions

What does utils.ts do?
utils.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in utils.ts?
utils.ts defines 3 function(s): absoluteUrl, cn, formatDate.
What does utils.ts depend on?
utils.ts imports 2 module(s): clsx, tailwind-merge.
Where is utils.ts in the architecture?
utils.ts is located at deprecated/www/lib/utils.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/lib).

Analyze Your Own Codebase

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

Try Supermodel Free