0

I don't understand why Lodash's _.isObject() function depicts null to being of type object while in Javascript it actually is an object?

Why do they (lodash) do this on the function?

function isObject(value) {
  const type = typeof value
  return value != null && (type == 'object' || type == 'function')
}

export default isObject
koech
  • 566
  • 1
  • 5
  • 15

0 Answers0