-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replace deprecated String.prototype.substr() #1836
refactor: replace deprecated String.prototype.substr() #1836
Conversation
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Codecov Report
@@ Coverage Diff @@
## dev #1836 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 180 180
Lines 2034 2034
Branches 524 524
=========================================
Hits 2034 2034
Continue to review full report at Codecov.
|
Thanks |
## [1.11.1](v1.11.0...v1.11.1) (2022-04-15) ### Bug Fixes * add Bengali (Bangladesh) [bn-bd] locale ([#1806](#1806)) ([840ed76](840ed76)) * refactor replace deprecated String.prototype.substr() ([#1836](#1836)) ([627fa39](627fa39)) * Update German [de] locale, adds the abbreviations for month including a . in the end, as in September -> Sept. ([#1831](#1831)) ([4e2802c](4e2802c)) * update Italian (Switzerland) [it-ch] locale relativeTime ([#1829](#1829)) ([8e6d11d](8e6d11d)) * update Kurdish [ku] locale strings and formatted output contains non-standard kurdish characters ([#1848](#1848)) ([a597d0b](a597d0b)) * update locale bo [Tibetan]: corrected the orders in formats ([#1823](#1823)) ([e790516](e790516))
🎉 This PR is included in version 1.11.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [1.11.1](iamkun/dayjs@v1.11.0...v1.11.1) (2022-04-15) ### Bug Fixes * add Bengali (Bangladesh) [bn-bd] locale ([#1806](iamkun/dayjs#1806)) ([840ed76](iamkun/dayjs@840ed76)) * refactor replace deprecated String.prototype.substr() ([#1836](iamkun/dayjs#1836)) ([627fa39](iamkun/dayjs@627fa39)) * Update German [de] locale, adds the abbreviations for month including a . in the end, as in September -> Sept. ([#1831](iamkun/dayjs#1831)) ([4e2802c](iamkun/dayjs@4e2802c)) * update Italian (Switzerland) [it-ch] locale relativeTime ([#1829](iamkun/dayjs#1829)) ([8e6d11d](iamkun/dayjs@8e6d11d)) * update Kurdish [ku] locale strings and formatted output contains non-standard kurdish characters ([#1848](iamkun/dayjs#1848)) ([a597d0b](iamkun/dayjs@a597d0b)) * update locale bo [Tibetan]: corrected the orders in formats ([#1823](iamkun/dayjs#1823)) ([e790516](iamkun/dayjs@e790516))
## [1.11.1](iamkun/dayjs@v1.11.0...v1.11.1) (2022-04-15) ### Bug Fixes * add Bengali (Bangladesh) [bn-bd] locale ([#1806](iamkun/dayjs#1806)) ([840ed76](iamkun/dayjs@840ed76)) * refactor replace deprecated String.prototype.substr() ([#1836](iamkun/dayjs#1836)) ([627fa39](iamkun/dayjs@627fa39)) * Update German [de] locale, adds the abbreviations for month including a . in the end, as in September -> Sept. ([#1831](iamkun/dayjs#1831)) ([4e2802c](iamkun/dayjs@4e2802c)) * update Italian (Switzerland) [it-ch] locale relativeTime ([#1829](iamkun/dayjs#1829)) ([8e6d11d](iamkun/dayjs@8e6d11d)) * update Kurdish [ku] locale strings and formatted output contains non-standard kurdish characters ([#1848](iamkun/dayjs#1848)) ([a597d0b](iamkun/dayjs@a597d0b)) * update locale bo [Tibetan]: corrected the orders in formats ([#1823](iamkun/dayjs#1823)) ([e790516](iamkun/dayjs@e790516))
## [1.11.1](iamkun/dayjs@v1.11.0...v1.11.1) (2022-04-15) ### Bug Fixes * add Bengali (Bangladesh) [bn-bd] locale ([#1806](iamkun/dayjs#1806)) ([840ed76](iamkun/dayjs@840ed76)) * refactor replace deprecated String.prototype.substr() ([#1836](iamkun/dayjs#1836)) ([627fa39](iamkun/dayjs@627fa39)) * Update German [de] locale, adds the abbreviations for month including a . in the end, as in September -> Sept. ([#1831](iamkun/dayjs#1831)) ([4e2802c](iamkun/dayjs@4e2802c)) * update Italian (Switzerland) [it-ch] locale relativeTime ([#1829](iamkun/dayjs#1829)) ([8e6d11d](iamkun/dayjs@8e6d11d)) * update Kurdish [ku] locale strings and formatted output contains non-standard kurdish characters ([#1848](iamkun/dayjs#1848)) ([a597d0b](iamkun/dayjs@a597d0b)) * update locale bo [Tibetan]: corrected the orders in formats ([#1823](iamkun/dayjs#1823)) ([e790516](iamkun/dayjs@e790516))
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.