From 9a15583fc73a42a5575328e66ac5678be96fde8b Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Wed, 27 Jan 2016 15:05:43 +0200 Subject: [PATCH] doc: document deprecation of util._extend doc: document deprecation of util._extend See the discussion here #4593 for more details as well as the 2016-01-20 minutes. --- doc/api/util.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 6c7a9272f68196..de492c5ca73f38 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -548,6 +548,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