summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-12-09 05:33:00 -0200
committerRuben Bridgewater <ruben@bridgewater.de>2017-12-21 03:45:26 -0300
commit353cc3d35af010e0593ef9977d9b451a5c295965 (patch)
tree459b57767a5c2554ab0a3516c267a7969a437a27 /lib
parentc2203cb4dd240a6644177f04d0b40f40090b4c33 (diff)
downloadandroid-node-v8-353cc3d35af010e0593ef9977d9b451a5c295965.tar.gz
android-node-v8-353cc3d35af010e0593ef9977d9b451a5c295965.tar.bz2
android-node-v8-353cc3d35af010e0593ef9977d9b451a5c295965.zip
util: rename util.inspect argument
util.inspect can actually receive any property and the description was wrong so far. This fixes it by renaming the argument to value and also updating the description. PR-URL: https://github.com/nodejs/node/pull/17576 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/util.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/util.js b/lib/util.js
index c64b8ea40a..0d75e43f08 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -263,14 +263,14 @@ function debuglog(set) {
}
/**
- * Echos the value of a value. Tries to print the value out
+ * Echos the value of any input. Tries to print the value out
* in the best way possible given the different types.
*
- * @param {Object} obj The object to print out.
+ * @param {any} value The value to print out.
* @param {Object} opts Optional options object that alters the output.
*/
-/* Legacy: obj, showHidden, depth, colors*/
-function inspect(obj, opts) {
+/* Legacy: value, showHidden, depth, colors*/
+function inspect(value, opts) {
// Default options
const ctx = {
seen: [],
@@ -305,7 +305,7 @@ function inspect(obj, opts) {
}
if (ctx.colors) ctx.stylize = stylizeWithColor;
if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity;
- return formatValue(ctx, obj, ctx.depth);
+ return formatValue(ctx, value, ctx.depth);
}
inspect.custom = customInspectSymbol;