MCPcopy Create free account
hub / github.com/dataease/SQLBot / dropEndingNewline

Function dropEndingNewline

frontend/public/swagger-ui-bundle.js:34252–34254  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

34250 a = '\n' === s[s.length - 1]
34251 return i + (a && ('\n' === s[s.length - 2] || '\n' === s) ? '+' : a ? '' : '-') + '\n'
34252 }
34253 function dropEndingNewline(s) {
34254 return '\n' === s[s.length - 1] ? s.slice(0, -1) : s
34255 }
34256 function foldLine(s, o) {
34257 if ('' === s || ' ' === s[0]) return s

Callers 1

writeScalarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected