feat: refactoring project
This commit is contained in:
4
node_modules/webpack/lib/util/nonNumericOnlyHash.js
generated
vendored
4
node_modules/webpack/lib/util/nonNumericOnlyHash.js
generated
vendored
@@ -15,8 +15,8 @@ const A_CODE = "a".charCodeAt(0);
|
||||
module.exports = (hash, hashLength) => {
|
||||
if (hashLength < 1) return "";
|
||||
const slice = hash.slice(0, hashLength);
|
||||
if (slice.match(/[^\d]/)) return slice;
|
||||
if (/[^\d]/.test(slice)) return slice;
|
||||
return `${String.fromCharCode(
|
||||
A_CODE + (parseInt(hash[0], 10) % 6)
|
||||
A_CODE + (Number.parseInt(hash[0], 10) % 6)
|
||||
)}${slice.slice(1)}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user