Change all occurences of .substr(...) to .substring(...) (#1479)

This commit is contained in:
Jaco
2022-05-09 12:50:13 +03:00
committed by GitHub
parent 1a57abde6e
commit 9ae4b1066e
10 changed files with 13 additions and 10 deletions
+1 -1
View File
@@ -20,5 +20,5 @@ import type { AnyString } from '../types';
export function stringShorten (value: AnyString, prefixLength = 6): string {
return value.length <= 2 + 2 * prefixLength
? value.toString()
: `${value.substr(0, prefixLength)}…${value.slice(-prefixLength)}`;
: `${value.substring(0, prefixLength)}…${value.slice(-prefixLength)}`;
}