初始化环境文件
This commit is contained in:
13
node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js
generated
vendored
Normal file
13
node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export const isChecksumWithPartNumber = (checksum) => {
|
||||
const lastHyphenIndex = checksum.lastIndexOf("-");
|
||||
if (lastHyphenIndex !== -1) {
|
||||
const numberPart = checksum.slice(lastHyphenIndex + 1);
|
||||
if (!numberPart.startsWith("0")) {
|
||||
const number = parseInt(numberPart, 10);
|
||||
if (!isNaN(number) && number >= 1 && number <= 10000) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user