-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for string interpolation. Fixes #20 #23
Changes from 1 commit
5731fa2
e244713
50755f5
d384e37
4bee762
bb02846
9e1cac7
cdbf135
fe8c7cb
5b6b670
721a146
664013b
938daa0
37a7fc1
ffaa379
55f58df
e7252da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ class Signale { | |
if (args[0] instanceof Error) { | ||
[msg] = args; | ||
} else { | ||
let [{prefix, message, suffix}] = args; | ||
const [{prefix, message, suffix}] = args; | ||
msg = message ? util.format(...message) : util.format(...args); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Original comment: #23 (comment) |
||
additional = Object.assign({}, {suffix, prefix}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a minor reordering of the assignments: const [{prefix, message, suffix}] = args;
additional = Object.assign({}, {suffix, prefix});
msg = message ? util.format(...message) : this._hasAdditional(additional, args); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's better than my previous method |
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original comment: #23 (comment)