UNPKG

fast-string-truncated-width

Version:

A fast function for calculating where a string should be truncated, given an optional width limit and an ellipsis string.

5 lines (4 loc) 306 B
import type { TruncationOptions, WidthOptions, Result } from './types.js'; declare const getStringTruncatedWidth: (input: string, truncationOptions?: TruncationOptions, widthOptions?: WidthOptions) => Result; export default getStringTruncatedWidth; export type { TruncationOptions, WidthOptions, Result };