MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / truncate

Function truncate

ServerEditorWeb/ace/worker-html.js:9714–9720  ·  view source on GitHub ↗
(s, n)

Source from the content-addressed store, hash-verified

9712}
9713
9714function truncate(s, n) {
9715 if (util.isString(s)) {
9716 return s.length < n ? s : s.slice(0, n);
9717 } else {
9718 return s;
9719 }
9720}
9721
9722function getMessage(self) {
9723 return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +

Callers 1

getMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected