|
@ -318,7 +318,7 @@ function formatError(value) { |
|
|
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { |
|
|
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { |
|
|
var output = []; |
|
|
var output = []; |
|
|
for (var i = 0, l = value.length; i < l; ++i) { |
|
|
for (var i = 0, l = value.length; i < l; ++i) { |
|
|
if (Object.prototype.hasOwnProperty.call(value, String(i))) { |
|
|
if (hasOwnProperty(value, String(i))) { |
|
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, |
|
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, |
|
|
String(i), true)); |
|
|
String(i), true)); |
|
|
} else { |
|
|
} else { |
|
@ -349,7 +349,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { |
|
|
str = ctx.stylize('[Setter]', 'special'); |
|
|
str = ctx.stylize('[Setter]', 'special'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!visibleKeys.hasOwnProperty(key)) { |
|
|
if (!hasOwnProperty(visibleKeys, key)) { |
|
|
name = '[' + key + ']'; |
|
|
name = '[' + key + ']'; |
|
|
} |
|
|
} |
|
|
if (!str) { |
|
|
if (!str) { |
|
@ -556,3 +556,7 @@ exports._extend = function(origin, add) { |
|
|
} |
|
|
} |
|
|
return origin; |
|
|
return origin; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function hasOwnProperty(obj, prop) { |
|
|
|
|
|
return Object.prototype.hasOwnProperty.call(obj, prop); |
|
|
|
|
|
} |
|
|