Skip to content
Closed
Show file tree
Hide file tree
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
util: runtime deprecate util.isPrimitive
  • Loading branch information
marco-ippolito committed Nov 24, 2023
commit 58a1e2555dfb184922c71712a1656f8f8e5dc2e0
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,9 @@ The [`util.isObject()`][] API is deprecated.

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/50488
description: Runtime deprecation.
- version:
- v6.12.0
- v4.8.6
Expand All @@ -1210,7 +1213,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

The [`util.isPrimitive()`][] API is deprecated.

Expand Down
6 changes: 5 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,11 @@ module.exports = {
isFunction: deprecate(isFunction,
'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.',
'DEP0049'),
isPrimitive: deprecate(isPrimitive, 'The `util.isPrimitive API is deprecated.', 'DEP0054'),
isPrimitive: deprecate(isPrimitive,
'The `util.isPrimitive` API is deprecated. ' +
'Please use `arg === null || ' +
'(typeof arg !== "object" && typeof arg !== "function")` instead.',
'DEP0054'),
log: deprecate(log, 'The `util.log API is deprecated.', 'DEP0059'),
Comment thread
marco-ippolito marked this conversation as resolved.
Outdated
promisify,
stripVTControlCharacters,
Expand Down