Skip to content
Merged
Changes from all commits
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
12 changes: 6 additions & 6 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,10 @@ 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)`.
This can also be used in a `try/catch` block to handle invalid date objects.

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

<!-- YAML
Expand All @@ -1109,9 +1113,7 @@ changes:

Type: End-of-Life

The `util.isError()` API has been removed. Please use
`Object.prototype.toString(arg) === '[object Error]' || arg instanceof Error`
instead.
The `util.isError()` API has been removed. Please use `Error.isError(arg)`.

### DEP0049: `util.isFunction()`

Expand Down Expand Up @@ -1272,9 +1274,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
Loading