-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Closed
Labels
utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
The semantics for the util is... functions are somewhat unexpected. For example, the documentation for util.isRegExp says:
Returns true if the given "object" is a RegExp. false otherwise.
But I'm seeing that util.isRegExp(Object.create(RegExp.prototype)) === false.
Can we clarify the documentation to explain why this is not a RegExp or change the semantics of isRegExp please? (Same goes with the other is functions.) Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.