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

refactor: use primordials for extensions/console #11249

Merged
merged 11 commits into from
Jul 6, 2021

Conversation

littledivy
Copy link
Member

Ref #11224

@littledivy littledivy marked this pull request as ready for review July 4, 2021 11:58
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Divy, I found a few missed

extensions/console/02_console.js Outdated Show resolved Hide resolved
extensions/console/02_console.js Show resolved Hide resolved
extensions/console/02_console.js Outdated Show resolved Hide resolved
Comment on lines +629 to +635
return StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(string, /[\b]/g, "\\b"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:( maybe use temp variable and reassign to it? It's hard to read

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also generally looks like something in need of cleanup. Doing a full text scan 7 times doesn't seem very efficient...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that looks ugly though I did not want to change any functionality in this PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Let's do that in a follow up

extensions/console/02_console.js Outdated Show resolved Hide resolved
extensions/console/02_console.js Outdated Show resolved Hide resolved
extensions/console/02_console.js Show resolved Hide resolved
@bartlomieju bartlomieju mentioned this pull request Jul 6, 2021
67 tasks
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Divy

@bartlomieju bartlomieju merged commit 2ed222f into denoland:main Jul 6, 2021
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

3 participants