MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / normalizeNewlines

Function normalizeNewlines

src/utils/normalizeNewlines.js:1–9  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1export function normalizeNewlines(str) {
2 // remove all <CR>
3 str = str.replace(/\r/g, '')
4 // no extra newlines up front
5 str = str.replace(/^\n+/, '')
6 // and a single newline at the end
7 str = str.replace(/\n+$/, '') + '\n'
8 return str
9}

Callers 8

withoutSignatureMethod · 0.90
gpgsigMethod · 0.90
signMethod · 0.90
fromPayloadSignatureMethod · 0.90
justMessageMethod · 0.90
renderMethod · 0.90
withoutSignatureMethod · 0.90
signMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…