-
| I have the following code: function x (arg) {
   // ... 
}I want to check if the variable  console.log(arg instanceof mongoose.Query ) // false
console.log(Object.getPrototypeOf(arg) == mongoose.Query ) // false
console.log(Object.getPrototypeOf(arg) === mongoose.Query ) // falseI asked the question on StackOverFlow as well https://stackoverflow.com/questions/73171286/check-if-the-argument-provided-is-a-mongoose-query | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            samislam
          
      
      
        Jul 30, 2022 
      
    
    Replies: 1 comment
-
| It turned out that I was passing the wrong  console.log(arg instanceof mongoose.Query ) // false | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        samislam
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
It turned out that I was passing the wrong
argwhile testing, the actual answer is: