• Truncates text based on the given length and adds an ellipsis

    Example

    truncate("this is very large text") // this ...
    

    Parameters

    • text: string
    • length: number = 5

    Returns string

Generated using TypeDoc