-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
Description
- Version:
v6.3.0 - Platform:
4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I have one file, say is.js, that contains the following:
exports.isObject = (obj) => obj.constructor === Object
exports.isNumber = (obj) => obj.constructor === NumberIn the console, require('./is.js').isObject({}) returns false. However, ({}).constructor === Object returns true. Strangely, isNumber(2) works as expected. When required from another file, everything works as expected.
Affected classes:
ObjectArrayDateErrorRegExp
Unaffected classes:
NumberStringBooleanMapSetSymbol- Typed arrays
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.