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

Avoid String.repeat #182

Closed
daurnimator opened this issue Mar 11, 2019 · 2 comments
Closed

Avoid String.repeat #182

daurnimator opened this issue Mar 11, 2019 · 2 comments

Comments

@daurnimator
Copy link
Contributor

String.repeat is not implemented in older browsers.

pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''

@alexei
Copy link
Owner

alexei commented Mar 11, 2019

@alexei alexei closed this as completed Mar 11, 2019
@daurnimator
Copy link
Contributor Author

I'm using your library in a context where I can't modify the global environment. Is there some way I could pass repeat in?
Alternatively it would be great if you could include a compatibility shim.
https://github.com/zloirock/core-js/blob/7586b39efdb16e81a8e54e4d780f402456b3fd4a/packages/core-js/internals/string-repeat.js#L12 seems like a good one.

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

No branches or pull requests

2 participants