Skip to content

Commit

Permalink
chore: remove usage of deprecated substr (#2157)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 authored Mar 6, 2023
1 parent 4100805 commit d518616
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/acl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ class AclRoleAccessorMethods {
const isPrefix = entity.charAt(entity.length - 1) === '-';

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

if (isPrefix) {
method = method.replace('-', '');
Expand Down
4 changes: 2 additions & 2 deletions src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1465,8 +1465,8 @@ class File extends ServiceObject<File> {
.split(',')
.forEach((hashKeyValPair: string) => {
const delimiterIndex = hashKeyValPair.indexOf('=');
const hashType = hashKeyValPair.substr(0, delimiterIndex);
const hashValue = hashKeyValPair.substr(delimiterIndex + 1);
const hashType = hashKeyValPair.substring(0, delimiterIndex);
const hashValue = hashKeyValPair.substring(delimiterIndex + 1);
hashes[hashType as 'crc32c' | 'md5'] = hashValue;
});
}
Expand Down

0 comments on commit d518616

Please sign in to comment.