Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
debug.formatArgs = function() {
const args = Array.prototype.slice.call(arguments);
const diff = debug.humanize(this.diff);
// Mimic console.* functions by treating additional arguments as
// printf-style arguments.
let msg = util.format.apply(this, args);
const format = `(+${diff}) ${msg}`;
if (this.useColors) {
msg = `\u001b[3${this.color}m${format}\u001b[0m`;
} else {
msg = format;
}
return [ msg ];
};
debug.formatArgs = function(args) {
const diff = debug.humanize(this.diff);
// Mimic console.* functions by treating additional arguments as
// printf-style arguments.
let msg = util.format.apply(util, args);
args.length = 1;
const format = `(+${diff}) ${msg}`;
if (this.useColors) {
msg = `\u001b[3${this.color}m${format}\u001b[0m`;
} else {
msg = format;
}
args[0] = msg;
};
debug.formatArgs = function (args) {
const log = {
args: args.concat([]),
namespace: this.namespace,
diff: debug.humanize(this.diff),
time: new Date().toISOString()
}
try {
throw Error('')
} catch (error) {
log.stack = error.stack.split('\n')
log.stack.shift()
log.stack.shift()
log.stack.shift()
log.stack = log.stack.map(trace => trace.trim())
}
if (!console.history) {
deb.formatArgs = function formatArgs() {
var args = arguments;
var useColors = this.useColors;
var name = this.namespace;
var c = this.color;
args[0] = (new Date()).toLocaleString() +
' \u001b[3' + c + 'm' + name + ' '
+ '\u001b[0m'
+ args[0] + '\u001b[3' + c + 'm'
+ ' +' + deb.humanize(this.diff) + '\u001b[0m';
return args;
};
//# sourceMappingURL=configure.js.map