MCPcopy
hub / github.com/prometheus/client_js / escapeString

Function escapeString

lib/registry.js:234–236  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

232 return escapeString(str).replace(/"/g, '\\"');
233}
234function escapeString(str) {
235 return str.replace(/\\/g, '\\\\').replace(/\n/g, '\\n');
236}
237function standardizeCounterName(name) {
238 return name.replace(/_total$/, '');
239}

Callers 2

getMetricsAsStringMethod · 0.85
escapeLabelValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected