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>
v6.x
Evan Lucas 9 years ago
parent
commit
f15d2d6dae
  1. 2
      doc/api/util.md

2
doc/api/util.md

@ -52,7 +52,7 @@ it is marked as deprecated.
```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