Spaces:
Runtime error
Runtime error
Download static/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js
-
curl -L -o pushNestedArrayPaths.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js
353 Bytes
| ; | |
| 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); | |
| } | |
| } | |
| }; | |