substring text with elipses

PHOTO EMBED

Mon Oct 31 2022 01:26:30 GMT+0000 (Coordinated Universal Time)

Saved by @davidmchale #return #true #substring #elipses

export function getDescription(text) {
    if(text.length > 10){
        return text.substring(0, 10) + "..."
    }
    return text
}
content_copyCOPY