MCPcopy Index your code
hub / github.com/Starcounter-Jack/JSON-Patch / hasUndefined

Function hasUndefined

module/helpers.mjs:122–145  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

120* Recursively checks whether an object has any undefined values inside.
121*/
122export function hasUndefined(obj) {
123 if (obj === undefined) {
124 return true;
125 }
126 if (obj) {
127 if (Array.isArray(obj)) {
128 for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
129 if (hasUndefined(obj[i_1])) {
130 return true;
131 }
132 }
133 }
134 else if (typeof obj === "object") {
135 var objKeys = _objectKeys(obj);
136 var objKeysLength = objKeys.length;
137 for (var i = 0; i < objKeysLength; i++) {
138 if (hasUndefined(obj[objKeys[i]])) {
139 return true;
140 }
141 }
142 }
143 }
144 return false;
145}
146function patchErrorMessageFormatter(message, args) {
147 var messageParts = [message];
148 for (var key in args) {

Callers 2

validatorFunction · 0.90
validatorFunction · 0.90

Calls 1

_objectKeysFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…