Skip to content

isObject should not include check for having a constructor #4

@mb-dev

Description

@mb-dev

Mongo lean objects don't have a constructor, so using isObject return false

isObject = (value) ->
  return false if not value?
  return false if typeof value isnt 'object'
  value.constructor is Object # <-- should not exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions