Initial commit
This commit is contained in:
19
node_modules/mongoose/lib/helpers/query/hasDollarKeys.js
generated
vendored
Normal file
19
node_modules/mongoose/lib/helpers/query/hasDollarKeys.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
/*!
|
||||
* ignore
|
||||
*/
|
||||
|
||||
module.exports = function(obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
const keys = Object.keys(obj);
|
||||
const len = keys.length;
|
||||
for (let i = 0; i < len; ++i) {
|
||||
if (keys[i].startsWith('$')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user