MCPcopy
hub / github.com/prettier/prettier / removeFinalNewLine

Function removeFinalNewLine

tests/integration/run-cli.js:25–26  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

23);
24const IS_CI = Boolean(process.env.CI);
25const removeFinalNewLine = (string) =>
26 string.endsWith("\n") ? string.slice(0, -1) : string;
27const SUPPORTS_DISABLE_WARNING_FLAG =
28 Number(process.versions.node.split(".", 1)[0]) >= 20;
29const promiseWithResolvers = Promise.withResolvers

Callers 1

removeStdioFinalNewLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…