-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(runtime): Implement console.Console
#5448
Conversation
@@ -27,7 +27,7 @@ var formatRegExp = /%[sdjfoc%]/g; | |||
function formatWithOptions(inspectOptions, f) { | |||
if (!isString(f)) { | |||
var objects = []; | |||
for (var i = 0; i < arguments.length; i++) { | |||
for (var i = 1; i < arguments.length; i++) { |
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.
(fixes formatWithOptions({colors:true}, {x:2)
)
); | ||
}; | ||
|
||
var isZeroWidthCodePoint = code => { |
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.
really wish this was like 95% less javascript
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.
I hear you.
// Adopted from https://github.com/chalk/ansi-regex/blob/HEAD/index.js | ||
// License: MIT, authors: @sindresorhus, Qix-, arjunmehta and LitoMore | ||
// Matches all ansi escape code sequences in a string | ||
var ansiPattern = |
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.
this is going to be extremely slow due to interpretor overhead
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.
but still.. it's merged?
What does this PR do?
Copies node's implementation for
console.Console
, which gives the console interface but piped to any node stream. This enables:console.Console
constructor. #3625and this will write to the file
TODO: