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

Function _pushNestedArrayPaths

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

Source from the content-addressed store, hash-verified

3307}
3308
3309function _pushNestedArrayPaths(val, paths, path) {
3310 if (val != null) {
3311 const numElements = val.length;
3312 for (let j = 0; j < numElements; ++j) {
3313 if (Array.isArray(val[j])) {
3314 _pushNestedArrayPaths(val[j], paths, path + '.' + j);
3315 } else {
3316 paths.add(path + '.' + j);
3317 }
3318 }
3319 }
3320}
3321
3322/*!
3323 * ignore

Callers 2

document.jsFile · 0.85
_addArrayPathsToValidateFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected