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

Non-polyfilling version #4

Closed
jfirebaugh opened this issue Nov 16, 2016 · 1 comment · Fixed by #5
Closed

Non-polyfilling version #4

jfirebaugh opened this issue Nov 16, 2016 · 1 comment · Fixed by #5

Comments

@jfirebaugh
Copy link

I'd like to be able to do const stringFromCodePoint = require('string.fromCodePoint'); and not touch any global state.

Rationale: I'm writing a library. It needs to use the "string from codepoint" algorithm, but it shouldn't go around changing globals itself. For instance, the user may be polyfilling String.fromCodePoint themselves, with another implementation, and my library should not overwrite that.

@mathiasbynens
Copy link
Owner

For instance, the user may be polyfilling String.fromCodePoint themselves, with another implementation, and my library should not overwrite that.

That’s not what would happen:

if (!String.fromCodePoint) {

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 a pull request may close this issue.

2 participants