MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / assertNoLineBreaks

Function assertNoLineBreaks

packages/server/src/svc/systemd-unit.ts:5–9  ·  view source on GitHub ↗
(value: string, label: string)

Source from the content-addressed store, hash-verified

3const FORBIDDEN = /[\r\n]/;
4
5function assertNoLineBreaks(value: string, label: string): void {
6 if (FORBIDDEN.test(value)) {
7 throw new Error(`${label} cannot contain CR or LF characters.`);
8 }
9}
10
11
12function systemdEscapeArg(value: string): string {

Callers 2

systemdEscapeArgFunction · 0.85
buildSystemdUnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected