/
1Rrd0
/
Course
Обзор
Документация
Войти
/
1Rrd0
/
Course
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js
15 строк
353 B
dima
2
13 дек 2025, 10:58
13 дек 2025, 10:58
ce5a48e
Код
Авторство
О чём код?
'use strict'; module.exports = function pushNestedArrayPaths(paths, nestedArray, path) { if (nestedArray == null) { return; } for (let i = 0; i < nestedArray.length; ++i) { if (Array.isArray(nestedArray[i])) { pushNestedArrayPaths(paths, nestedArray[i], path + '.' + i); } else { paths.push(path + '.' + i); } } };