zkochan / packages

Zoltan Kochan's npm packages
MIT License
99 stars 26 forks source link

refactor: remove deprecated substr #164

Closed masterX89 closed 2 years ago

masterX89 commented 2 years ago

Hello, String.prototype.substr() is a deprecated function, maybe use String.prototype.slice() is better.

String.prototype.substr() is defined in Annex B of the ECMA-262 standard. We can find introduction like this:

These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code.

zkochan commented 2 years ago

I think .substring() should be fine

masterX89 commented 2 years ago

I think .substring() should be fine

changed to .substring()