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

Function _pushNestedArrayPaths

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

Source from the content-addressed store, hash-verified

3272}
3273
3274function _pushNestedArrayPaths(val, paths, path) {
3275 if (val != null) {
3276 const numElements = val.length;
3277 for (let j = 0; j < numElements; ++j) {
3278 if (Array.isArray(val[j])) {
3279 _pushNestedArrayPaths(val[j], paths, path + '.' + j);
3280 } else {
3281 paths.add(path + '.' + j);
3282 }
3283 }
3284 }
3285}
3286
3287/*!
3288 * ignore

Callers 2

document.jsFile · 0.85
_addArrayPathsToValidateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected