Skip to content

Commit d829028

Browse files
benjamingrjasnell
authored andcommitted
doc: document deprecation of util._extend
Document that util._extend was never intended to be used and should be considered deprecated. PR-URL: #4903 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 939d6ef commit d829028

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/api/util.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ Deprecated predecessor of `console.log`.
567567

568568
Deprecated predecessor of `console.log`.
569569

570+
## util._extend(obj)
571+
572+
Stability: 0 - Deprecated: Use Object.assign() instead.
573+
574+
`_extend` was never intended to be used outside of internal NodeJS modules. The
575+
community found and used it anyway.
576+
577+
It is deprecated and should not be used in new code. JavaScript comes with very
578+
similar built-in functionality through `Object.assign`.
579+
570580
[`Array.isArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
571581
[constructor]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor
572582
[Customizing `util.inspect` colors]: #util_customizing_util_inspect_colors

0 commit comments

Comments
 (0)