diff options
author | Benjamin Gruenbaum <inglor@gmail.com> | 2016-01-24 11:15:51 +0200 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2016-01-27 23:00:20 +0100 |
commit | 334a7e36144e3f2ef085105e1bf080c67873157d (patch) | |
tree | 359b394b2f2c3d7edc3b99ac86546122a17701b5 /doc/api/util.markdown | |
parent | 4714abb4828328cf466a442944fa66362185ecef (diff) | |
download | node-new-334a7e36144e3f2ef085105e1bf080c67873157d.tar.gz |
doc: replace function expressions with arrows
This commit replaces multiple usages of `function(){}` with ES2015
arrow functions in places it was forgotten earlier. The goal is to
make the docs more consistent since other functions were already
replaced with ES2015 arrows.
In addition, it fixes invalid syntax in modules.markdown to valid
syntax as well as remove `var self = this` pattern usages in the code
where they are now possible to avoid through arrow functions.
PR-URL: https://github.com/nodejs/node/pull/4832
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/util.markdown')
-rw-r--r-- | doc/api/util.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/util.markdown b/doc/api/util.markdown index f12ee2780b..c5c14a7c11 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -58,7 +58,7 @@ Marks that a method should not be used any more. ```js const util = require('util'); -exports.puts = util.deprecate(function() { +exports.puts = util.deprecate(() => { for (var i = 0, len = arguments.length; i < len; ++i) { process.stdout.write(arguments[i] + '\n'); } |