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

util: eliminate unecessary internal/util export #11455

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 18, 2017

The objectToString method was only being used in one place
within internalUtil. It didn't make sense to have it as
a separate exported mnethod.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

internal util

The objectToString method was only being used in one place
within internalUtil. It didn't make sense to have it as
a separate exported mnethod.
@nodejs-github-bot nodejs-github-bot added the util Issues and PRs related to the built-in util module. label Feb 18, 2017
@jasnell
Copy link
Member Author

jasnell commented Feb 18, 2017

@targos
Copy link
Member

targos commented Feb 18, 2017

#11128 uses objectToString

@jasnell
Copy link
Member Author

jasnell commented Feb 18, 2017

hmm... could it not simply define it's own objectToString or use Object.prototype.toString() directly?

@jasnell
Copy link
Member Author

jasnell commented Feb 18, 2017

(thanks for pointing that out, btw :-) ...)

@targos
Copy link
Member

targos commented Feb 18, 2017

could it not simply define it's own objectToString or use Object.prototype.toString() directly

absolutely. /cc @joyeecheung

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

LGTM this function doesn't add much value

@joyeecheung
Copy link
Member

joyeecheung commented Feb 18, 2017

The reason to use objectToString is in #10282 (comment) , the util can do the caching part at startup(or even get the untampered with version through bindings)

@jasnell
Copy link
Member Author

jasnell commented Feb 19, 2017

hmm... I'll hold on this then. I've been thinking through a solution on trapping the instances of classes we depend on. I'll see if I can get that PR in later this week.

@jasnell
Copy link
Member Author

jasnell commented Feb 23, 2017

I'm going to go ahead and close this without further action. There are other places where this function is looking to be used.

@jasnell jasnell closed this Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants