Skip to content

Commit d518616

Browse files
authored
chore: remove usage of deprecated substr (#2157)
1 parent 4100805 commit d518616

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/acl.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ class AclRoleAccessorMethods {
303303
const isPrefix = entity.charAt(entity.length - 1) === '-';
304304

305305
accessMethods.forEach(accessMethod => {
306-
let method = accessMethod + entity[0].toUpperCase() + entity.substr(1);
306+
let method =
307+
accessMethod + entity[0].toUpperCase() + entity.substring(1);
307308

308309
if (isPrefix) {
309310
method = method.replace('-', '');

src/file.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,8 @@ class File extends ServiceObject<File> {
14651465
.split(',')
14661466
.forEach((hashKeyValPair: string) => {
14671467
const delimiterIndex = hashKeyValPair.indexOf('=');
1468-
const hashType = hashKeyValPair.substr(0, delimiterIndex);
1469-
const hashValue = hashKeyValPair.substr(delimiterIndex + 1);
1468+
const hashType = hashKeyValPair.substring(0, delimiterIndex);
1469+
const hashValue = hashKeyValPair.substring(delimiterIndex + 1);
14701470
hashes[hashType as 'crc32c' | 'md5'] = hashValue;
14711471
});
14721472
}

0 commit comments

Comments
 (0)