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

Function patchErrorMessageFormatter

module/helpers.mjs:146–155  ·  view source on GitHub ↗
(message, args)

Source from the content-addressed store, hash-verified

144 return false;
145}
146function patchErrorMessageFormatter(message, args) {
147 var messageParts = [message];
148 for (var key in args) {
149 var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
150 if (typeof value !== 'undefined') {
151 messageParts.push(key + ": " + value);
152 }
153 }
154 return messageParts.join('\n');
155}
156var PatchError = /** @class */ (function (_super) {
157 __extends(PatchError, _super);
158 function PatchError(message, name, index, operation, tree) {

Callers 1

PatchErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected