improbable-eng / grpc-web

gRPC Web implementation for Golang and TypeScript
Apache License 2.0
4.39k stars 436 forks source link

refactor: replace deprecated String.prototype.substr() #1094

Open CommanderRoot opened 2 years ago

CommanderRoot commented 2 years ago

Changes

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.

Verification

I have checked the return of each statement to make sure it's still the same as before