MCPcopy Create free account
hub / github.com/Starcounter-Jack/JSON-Patch / patchErrorMessageFormatter

Function patchErrorMessageFormatter

commonjs/helpers.js:156–165  ·  view source on GitHub ↗
(message, args)

Source from the content-addressed store, hash-verified

154}
155exports.hasUndefined = hasUndefined;
156function patchErrorMessageFormatter(message, args) {
157 var messageParts = [message];
158 for (var key in args) {
159 var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
160 if (typeof value !== 'undefined') {
161 messageParts.push(key + ": " + value);
162 }
163 }
164 return messageParts.join('\n');
165}
166var PatchError = /** @class */ (function (_super) {
167 __extends(PatchError, _super);
168 function PatchError(message, name, index, operation, tree) {

Callers 1

PatchErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected