Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better handling
  • Loading branch information
AugustinMauroy committed Jul 29, 2025
commit 2e80adfcee858102506639f59b0094fa0b29ed4c
7 changes: 4 additions & 3 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,9 @@ Type: End-of-Life
The `util.isDate()` API has been removed. Please use
`arg instanceof Date` instead.

Also for stronger approaches, consider using:
`Date.prototype.toString.call(arg) === '[object Date]' && !isNaN(arg)` It's also can be used in a `try/catch` block to catch invalid date objects.

### DEP0048: `util.isError()`

<!-- YAML
Expand Down Expand Up @@ -1270,9 +1273,7 @@ changes:

Type: End-of-Life

The `util.isPrimitive()` API has been removed. Please use
`arg === null || (typeof arg !=='object' && typeof arg !== 'function')`
instead.
The `util.isPrimitive()` API has been removed. Please use `Object(arg) !== arg` instead.

### DEP0055: `util.isRegExp()`

Expand Down