MCPcopy
hub / github.com/Pythagora-io/pythagora / cutWithDots

Function cutWithDots

src/utils/common.js:49–52  ·  view source on GitHub ↗
(string, cutAtChar = 100)

Source from the content-addressed store, hash-verified

47}
48
49const cutWithDots = (string, cutAtChar = 100) => {
50 if (cutAtChar >= string.length) return string;
51 return (string && string.length > cutAtChar) ? string.slice(0, cutAtChar) + '...' : string;
52}
53
54function parseString(s) {
55 if (typeof s === 'string') {

Callers 3

logEndpointCapturedFunction · 0.85
logTestFailedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected