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

Function _pushNestedArrayPaths

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

Source from the content-addressed store, hash-verified

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

Callers 2

document.jsFile · 0.85
_addArrayPathsToValidateFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected