MCPcopy
hub / github.com/chartbrew/chartbrew / sanitizeQueryPreview

Function sanitizeQueryPreview

server/modules/updateAudit.js:175–187  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

173}
174
175function sanitizeQueryPreview(query) {
176 if (!query) {
177 return null;
178 }
179
180 return truncateString(
181 collapseWhitespace(String(query))
182 .replace(/'[^']*'/g, "'?'")
183 .replace(/"[^"]*"/g, "\"?\"")
184 .replace(/\b\d+\b/g, "#"),
185 240
186 );
187}
188
189function getItemCount(value) {
190 if (Array.isArray(value)) {

Callers 1

runRequestMethod · 0.85

Calls 2

truncateStringFunction · 0.85
collapseWhitespaceFunction · 0.85

Tested by

no test coverage detected