mirror of
https://github.com/Azure/setup-helm.git
synced 2025-12-21 23:05:47 +00:00
committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
13
node_modules/object-inspect/index.js
generated
vendored
13
node_modules/object-inspect/index.js
generated
vendored
@@ -65,8 +65,9 @@ function addNumericSeparator(num, str) {
|
||||
return $replace.call(str, sepRegex, '$&_');
|
||||
}
|
||||
|
||||
var inspectCustom = require('./util.inspect').custom;
|
||||
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
|
||||
var utilInspect = require('./util.inspect');
|
||||
var inspectCustom = utilInspect.custom;
|
||||
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
||||
|
||||
module.exports = function inspect_(obj, options, depth, seen) {
|
||||
var opts = options || {};
|
||||
@@ -156,7 +157,7 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
||||
return inspect_(value, opts, depth + 1, seen);
|
||||
}
|
||||
|
||||
if (typeof obj === 'function') {
|
||||
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
||||
var name = nameOf(obj);
|
||||
var keys = arrObjKeys(obj, inspect);
|
||||
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
||||
@@ -186,15 +187,15 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
||||
}
|
||||
if (isError(obj)) {
|
||||
var parts = arrObjKeys(obj, inspect);
|
||||
if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
||||
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
||||
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
||||
}
|
||||
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
||||
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
||||
}
|
||||
if (typeof obj === 'object' && customInspect) {
|
||||
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
|
||||
return obj[inspectSymbol]();
|
||||
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
||||
return utilInspect(obj, { depth: maxDepth - depth });
|
||||
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
||||
return obj.inspect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user