less.js
less.js copied to clipboard
chore: replace deprecated String.prototype.substr()
What:
Replacing usage of .substr() with .slice()
Why:
String.prototype.substr() is deprecated.
Checklist:
- [ ] Documentation N/A
- [ ] Added/updated unit tests N/A
- [x] Code complete
Thanks for your contribution, @matthew-dean sir, what'r you opinion ? Do we need replace substr with slice now? (To be honest, I never use substr on my own code.
Oh interesting, I had no idea it was deprecated. However, I'm wary of this drop-in replace with .slice. The MDN document doesn't say that it's a drop-in replacement, and gives a different polyfill.