Closed daurnimator closed 4 years ago
A custom String repeat implementation was shipped up until https://github.com/alexei/sprintf.js/pull/139 It's not going back into the library. Sorry!
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.
https://github.com/alexei/sprintf.js/issues/182#issuecomment-471540906 is also a great point.
Library authors are now no longer able to use this library if they support IE11.
That removal should of also been a SEMVER MAJOR break.
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 https://github.com/fengari-lua/fengari/pull/149/commits/8cbc96e05bfdce0c074889fe526dc4e4b907bd45
In other hand String.repeat maybe a nice helper tool.
@alexei in https://github.com/alexei/sprintf.js/pull/183#issuecomment-473921746 do you mean that .repeat was introduced over custom String decorator? Do I take it as no for polyfills and no for decorators?
@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 https://github.com/alexei/sprintf.js/pull/183#issuecomment-476250542
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 https://github.com/alexei/sprintf.js/issues/192
Hey I've took my own spin on this matter https://github.com/alexei/sprintf.js/pull/193
Solves #182