| Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Path : /home/livedhms/lmgt/node_modules/mongoose/lib/helpers/ |
| Current File : /home/livedhms/lmgt/node_modules/mongoose/lib/helpers/isSimpleValidator.js |
'use strict';
/**
* 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;
};