MCPcopy Create free account
hub / github.com/Automattic/mongoose / _pushNestedArrayPaths

Function _pushNestedArrayPaths

lib/document.js:3211–3222  ·  view source on GitHub ↗
(val, paths, path)

Source from the content-addressed store, hash-verified

3209}
3210
3211function _pushNestedArrayPaths(val, paths, path) {
3212 if (val != null) {
3213 const numElements = val.length;
3214 for (let j = 0; j < numElements; ++j) {
3215 if (Array.isArray(val[j])) {
3216 _pushNestedArrayPaths(val[j], paths, path + '.' + j);
3217 } else {
3218 paths.add(path + '.' + j);
3219 }
3220 }
3221 }
3222}
3223
3224/*!
3225 * ignore

Callers 2

document.jsFile · 0.85
_addArrayPathsToValidateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected