Closed Shtian closed 6 years ago
Merging #112 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #112 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 23 23
Lines 148 148
=====================================
Hits 148 148
Impacted Files | Coverage Ξ | |
---|---|---|
...c/splitStringTransformer/splitStringTransformer.js | 100% <100%> (ΓΈ) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update f651e9d...23588d4. Read the comment docs.
Is this repository still being maintained? :)
Looks like the maintainer is recovering from an accident: https://github.com/nuxt/nuxt.js/issues/328 . I hope he's doing well!
Well spotted @ibrahima, thank you. Best wishes for a good recovery @declandewet!
Hi! I joined this project as a maintainer today.
I'm not too sure about this change because while .indexOf(...) >= 0
works, .includes(...)
is more modern, is a part of the official standard from 2 years ago, and is widely-supported.
In a scenario where you add a polyfill for String.prototype.includes
in your project you will be able to easily remove it if you decide to drop support for IE 11.
If .indexOf(...) >= 0
is used here instead, coming up with the right time to remove it will be much harder.
So it's not only about changing the library code to support an old browser, but about who's responsible for making the code work in the older browser.
What's your take on this? Would you be willing to use a polyfill? Instead of this change I'd add a note about ES features that should be polyfilled.
That sounds reasonable, @fatfisz. I agree with your statement, it's just the unfortunate few of us who have to cater for the remaining 3-4% on IE :) I've already solved this with a polyfill on my side, but a note about older browser support / polyfills in the readme would be great π
Thanks for your comment, I'll close this for now.
I couldn't agree more with the "unfortunate" bit, at my work we also support IE 11 and there's a dedicated file with polyfills - I had to add another one to the list no further than yesterday...
I'll add a note about used features soon, thanks for your patience π
When run in IE the code throws an error since String.prototype.includes does not exist in IE, and it is not transpiled by babel either. Can we switch to use the cross browser compatible
indexOf()
instead?