Spaces:
Runtime error
Runtime error
NarrativeFlow / static /node_modules /mongoose /lib /helpers /projection /isPathSelectedInclusive.js
Download static/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js
-
curl -L -o isPathSelectedInclusive.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js
566 Bytes
| ; | |
| /*! | |
| * ignore | |
| */ | |
| module.exports = function isPathSelectedInclusive(fields, path) { | |
| const chunks = path.split('.'); | |
| let cur = ''; | |
| let j; | |
| let keys; | |
| let numKeys; | |
| for (let i = 0; i < chunks.length; ++i) { | |
| cur += cur.length ? '.' : '' + chunks[i]; | |
| if (fields[cur]) { | |
| keys = Object.keys(fields); | |
| numKeys = keys.length; | |
| for (j = 0; j < numKeys; ++j) { | |
| if (keys[i].indexOf(cur + '.') === 0 && keys[i].indexOf(path) !== 0) { | |
| continue; | |
| } | |
| } | |
| return true; | |
| } | |
| } | |
| return false; | |
| }; | |