const wcstring = require ( "wcstring" ) ; export function toShortString ( obj ) { const maxLength = process . stdout . columns || 120 ; let result = obj ? obj . toString ( ) : "" ; result = result . replace ( /[\n\r]/g , " " ) ; let str = wcstring ( result ) ; return str . truncate ( maxLength , "..." ) ; }