MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / truncate

Function truncate

lib/output.js:321–330  ·  view source on GitHub ↗
(msg, gap = 0)

Source from the content-addressed store, hash-verified

319}
320
321function truncate(msg, gap = 0) {
322 if (msg.indexOf('\n') > 0 || outputLevel >= 3) {
323 return msg // don't cut multi line steps or on verbose log level
324 }
325 const width = (process.stdout.columns || 200) - gap - 4
326 if (msg.length > width) {
327 msg = msg.substr(0, width - 1) + figures.ellipsis
328 }
329 return msg
330}

Callers 2

logFunction · 0.85
stepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected