Skip to content

Commit

Permalink
doc: document deprecation of util._extend
Browse files Browse the repository at this point in the history
Document that util._extend was never intended to be used
and should be considered deprecated.

PR-URL: #4903
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
benjamingr authored and jasnell committed Mar 16, 2016
1 parent 939d6ef commit d829028
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/api/util.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,16 @@ Deprecated predecessor of `console.log`.

Deprecated predecessor of `console.log`.

## util._extend(obj)

Stability: 0 - Deprecated: Use Object.assign() instead.

`_extend` was never intended to be used outside of internal NodeJS modules. The
community found and used it anyway.

It is deprecated and should not be used in new code. JavaScript comes with very
similar built-in functionality through `Object.assign`.

[`Array.isArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
[constructor]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor
[Customizing `util.inspect` colors]: #util_customizing_util_inspect_colors
Expand Down

0 comments on commit d829028

Please sign in to comment.