TruncateOptions

import { TruncateOptions } from "jsr:@ende/text";

interface

interface TruncateOptions

Options for truncate.

Properties

suffix

suffix?: string

The string used to indicate where truncation occurred.

Default: "…"

position

position?: "end" | "middle" | "start"

Where to truncate.

  • "end": "very long te…"
  • "middle": "very l…g text" (useful for file paths)
  • "start": "…ery long text"

Default: "end"

Source