From 841ec1ca6fbbc776b445476db19be010eab5cd23 Mon Sep 17 00:00:00 2001 From: Nick Raienko Date: Mon, 27 Apr 2015 18:04:11 +0300 Subject: [PATCH 1/2] Update exports.deprecate to util.deprecate in example --- doc/api/util.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 77d9a8f66b58d4..56962cf65ce8d3 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -438,11 +438,13 @@ through the `constructor.super_` property. Marks that a method should not be used any more. - exports.puts = exports.deprecate(function() { + var util = require('utils'); + + exports.puts = util.deprecate(function() { for (var i = 0, len = arguments.length; i < len; ++i) { process.stdout.write(arguments[i] + '\n'); } - }, 'util.puts: Use console.log instead') + }, 'util.puts: Use console.log instead'); It returns a modified function which warns once by default. From 102ad8f3844b68635d6c83343c7bee7a96b4008e Mon Sep 17 00:00:00 2001 From: Nick Raienko Date: Mon, 27 Apr 2015 18:49:22 +0300 Subject: [PATCH 2/2] Fix type --- doc/api/util.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 56962cf65ce8d3..8ac15826933743 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -438,7 +438,7 @@ through the `constructor.super_` property. Marks that a method should not be used any more. - var util = require('utils'); + var util = require('util'); exports.puts = util.deprecate(function() { for (var i = 0, len = arguments.length; i < len; ++i) {