Saltar al contenido principal
Versión: 0.22.0

Function: truncatePath()

function truncatePath(text, max?): string;

Defined in: core/toolLabels.ts:23

Cuts a path to max characters from the front, with "…": unlike truncate() (which cuts the tail off long freeform text), a path's most useful part, the file name, is at the end.

Parameters​

ParameterTypeDefault value
textstringundefined
maxnumber60

Returns​

string