Skip to content

Commit 820f351

Browse files
Merge pull request debug-js#215 from gorangajic/add-ms-as-last-param
move ms to the last place
2 parents d188464 + dafc16e commit 820f351

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

node.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,21 @@ exports.formatters.o = exports.formatters.O = function(v) {
8080
*/
8181

8282
function formatArgs() {
83-
var args = arguments;
83+
var args = [];
84+
var len = arguments.length;
8485
var useColors = this.useColors;
8586
var name = this.namespace;
87+
for (var i = 0; i < len; i++) {
88+
args.push(arguments[i]);
89+
}
8690

8791
if (useColors) {
8892
var c = this.color;
8993

9094
args[0] = ' \u001b[3' + c + ';1m' + name + ' '
9195
+ '\u001b[0m'
92-
+ args[0] + '\u001b[3' + c + 'm'
93-
+ ' +' + exports.humanize(this.diff) + '\u001b[0m';
96+
+ args[0];
97+
args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
9498
} else {
9599
args[0] = new Date().toUTCString()
96100
+ ' ' + name + ' ' + args[0];

0 commit comments

Comments
 (0)