MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / pdfEscape

Function pdfEscape

src/cli/pdf-lite.ts:49–51  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

47
48/** Escape PDF string-literal specials. PURE. */
49export function pdfEscape(s: string): string {
50 return s.replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)');
51}
52
53/** Greedy word-wrap by an approximate per-char width (Helvetica avg ~0.5em; Courier 0.6em). PURE. */
54function wrap(text: string, size: number, mono: boolean, widthPts: number): string[] {

Callers 2

pdf-lite.test.tsFile · 0.90
buildPdfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected