Spaces:
Runtime error
Runtime error
Download static/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 296 Bytes
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js
-
curl -L -o sanitizeProjection.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js
296 Bytes
| ; | |
| module.exports = function sanitizeProjection(projection) { | |
| if (projection == null) { | |
| return; | |
| } | |
| const keys = Object.keys(projection); | |
| for (let i = 0; i < keys.length; ++i) { | |
| if (typeof projection[keys[i]] === 'string') { | |
| projection[keys[i]] = 1; | |
| } | |
| } | |
| }; | |