diff --git a/src/acl.ts b/src/acl.ts index 511d4634f..701917ac5 100644 --- a/src/acl.ts +++ b/src/acl.ts @@ -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('-', ''); diff --git a/src/file.ts b/src/file.ts index dd4fc6760..3813e32f1 100644 --- a/src/file.ts +++ b/src/file.ts @@ -1465,8 +1465,8 @@ class File extends ServiceObject { .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; }); }