-
-
Notifications
You must be signed in to change notification settings - Fork 2
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: initial commit #1
Conversation
|
||
await logging.init() | ||
|
||
const stream = split(logging.parseLine.bind(logging), { autoDestroy: true }) |
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 am a bit confused here:
logging.parseLine.bind(logging),
Why do we borrow and assign logging
to logging
? 🤔
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.
It's just to inject the function without losing the context of the this
.
If I just borrow the function, the parseLine
uses the this
to access a couple of helper functions and the Logging
instance, all of the previous will be lost if I don't properly hard-bind the logging
instance to the bind
function itself
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.
LGTM 👍
I'm just fuzzy in one moment - left a comment 😄
Let's merge and continue with adding testing in a next PR 👍 |
Initial PR for cloud-pine