Skip to content

Commit e55fdc4

Browse files
enaqxFishrock123
authored andcommitted
doc: fix util.deprecate example
PR-URL: #1535 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Julian Duque <[email protected]>
1 parent 2a3c8c1 commit e55fdc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/util.markdown

+4-2
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,13 @@ through the `constructor.super_` property.
438438

439439
Marks that a method should not be used any more.
440440

441-
exports.puts = exports.deprecate(function() {
441+
var util = require('util');
442+
443+
exports.puts = util.deprecate(function() {
442444
for (var i = 0, len = arguments.length; i < len; ++i) {
443445
process.stdout.write(arguments[i] + '\n');
444446
}
445-
}, 'util.puts: Use console.log instead')
447+
}, 'util.puts: Use console.log instead');
446448

447449
It returns a modified function which warns once by default.
448450

0 commit comments

Comments
 (0)