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

Include String.prototype.repeat shim #183

Closed

Conversation

daurnimator
Copy link
Contributor

Solves #182

@alexei
Copy link
Owner

alexei commented Mar 18, 2019

A custom String repeat implementation was shipped up until #139 It's not going back into the library. Sorry!

@aikar
Copy link

aikar commented Mar 25, 2019

With this being so tiny and not polluting String, what does it hurt to maintain it?
Don't get me wrong, I want IE to go away as much as anyone else, but for a simple project that wanted to support IE11, not being able to use this library without polyfills is a major setback.

@aikar
Copy link

aikar commented Mar 25, 2019

#182 (comment) is also a great point.

Library authors are now no longer able to use this library if they support IE11.

@aikar
Copy link

aikar commented Mar 25, 2019

That removal should of also been a SEMVER MAJOR break.

@ashwalk33r
Copy link

ashwalk33r commented Apr 2, 2020

Instead of .repeat other means of achieving desired output can be used that are supported in IE11 - I see people prefer to do it like in fengari-lua/fengari@8cbc96e

In other hand String.repeat maybe a nice helper tool.

@alexei in #183 (comment) do you mean that
.repeat was introduced over custom String decorator? Do I take it as no for polyfills and no for decorators?

@ashwalk33r
Copy link

ashwalk33r commented Apr 2, 2020

@daurnimator I don't get something - you create a custom function assigned to variable encapsulated properly and call it repeat.call(pad_character, pad_length) - what is this discussion with @alexei about? I agree with #183 (comment)

It's not a "function to mantain" - it is a reusable helper. @alexei do you want to have it used inline instead of being repeatable? What is "not requiring maintanance" solution that you wish for? Here you have it then #192

@ashwalk33r
Copy link

Hey I've took my own spin on this matter #193

@alexei alexei closed this May 18, 2020
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

4 participants