Spaces:
Runtime error
Runtime error
Download static/node_modules/mongoose/lib/helpers/isSimpleValidator.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 454 Bytes
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/isSimpleValidator.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongoose/lib/helpers/isSimpleValidator.js
-
curl -L -o isSimpleValidator.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongoose/lib/helpers/isSimpleValidator.js
454 Bytes
| ; | |
| /** | |
| * Determines if `arg` is a flat object. | |
| * | |
| * @param {Object|Array|String|Function|RegExp|any} arg | |
| * @api private | |
| * @return {Boolean} | |
| */ | |
| module.exports = function isSimpleValidator(obj) { | |
| const keys = Object.keys(obj); | |
| let result = true; | |
| for (let i = 0, len = keys.length; i < len; ++i) { | |
| if (typeof obj[keys[i]] === 'object' && obj[keys[i]] !== null) { | |
| result = false; | |
| break; | |
| } | |
| } | |
| return result; | |
| }; | |