Skip to content
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

Merged
merged 11 commits into from
Aug 9, 2022
Merged

feat: initial commit #1

merged 11 commits into from
Aug 9, 2022

Conversation

metcoder95
Copy link
Owner

@metcoder95 metcoder95 commented Jul 20, 2022

Initial PR for cloud-pine

@metcoder95 metcoder95 marked this pull request as ready for review August 4, 2022 21:35

await logging.init()

const stream = split(logging.parseLine.bind(logging), { autoDestroy: true })
Copy link
Collaborator

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? 🤔

Copy link
Owner Author

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

Copy link
Collaborator

@kruczyna kruczyna left a 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 😄

@metcoder95
Copy link
Owner Author

Let's merge and continue with adding testing in a next PR 👍

@metcoder95 metcoder95 merged commit 84711ee into main Aug 9, 2022
@metcoder95 metcoder95 deleted the feat/v1 branch August 9, 2022 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants