language-tools
language-tools copied to clipboard
[chore] replace deprecated String.prototype.substr()
String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated. .substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.
Converting this to a draft because I'm not sure if I would want to do this just because substr is deprecated (I don't think it will ever be removed honestly).