UNPKG

@amxdev/truncate-text

Version:

Truncate long text to a maximum length with ellipsis.

22 lines (13 loc) 292 B
# @amxdev/truncate-text > Truncate long text to a maximum length with ellipsis. ## Install ```bash npm install @amxdev/truncate-text ``` ## Usage ```ts import { truncatetext } from "@amxdev/truncate-text"; truncatetext(truncateText("Hello World", 5) // "Hello...") ``` ## License MIT