Skip to content

Commit

Permalink
reduce bundlesize for brotli by symbols reusing
Browse files Browse the repository at this point in the history
  • Loading branch information
artalar committed Apr 18, 2022
1 parent a584cfd commit 3937ce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.browser.js
Expand Up @@ -61,10 +61,10 @@ let nanoid = (size = 21) =>
} else if (byte < 62) {
// `A-Z`
id += (byte - 26).toString(36).toUpperCase()
} else if (byte < 63) {
id += '_'
} else {
} else if (byte > 62) {
id += '-'
} else {
id += '_'
}
return id
}, '')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -108,7 +108,7 @@
"name": "Brotli all",
"brotli": true,
"import": "{ nanoid, customAlphabet, urlAlphabet }",
"limit": "264 B"
"limit": "260 B"
},
{
"name": "Brotli non-secure",
Expand Down

0 comments on commit 3937ce9

Please sign in to comment.