Browse Source

doc: fix util.deprecate() example

The arguments object is not created for arrow functions so the example
was incorrect.

PR-URL: https://github.com/nodejs/node/pull/7674
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v4.x
Evan Lucas 8 years ago
committed by Myles Borins
parent
commit
fdff642e0b
  1. 2
      doc/api/util.md

2
doc/api/util.md

@ -58,7 +58,7 @@ Marks that a method should not be used any more.
```js
const util = require('util');
exports.puts = util.deprecate(() => {
exports.puts = util.deprecate(function() {
for (var i = 0, len = arguments.length; i < len; ++i) {
process.stdout.write(arguments[i] + '\n');
}

Loading…
Cancel
Save