Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
1 of 4
Daan
  • 8k
  • 5
  • 47
  • 54

The official underscore.js uses this check to find out if something is really an object

// Is a given variable an object?
_.isObject = function(obj) {
  return obj === Object(obj);
};
Daan
  • 8k
  • 5
  • 47
  • 54