diff --git a/index.browser.js b/index.browser.js index 09368f33..7ab1562c 100644 --- a/index.browser.js +++ b/index.browser.js @@ -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 }, '') diff --git a/package.json b/package.json index f59a441f..70186d41 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "clean": "rm -R coverage", "unit": "uvu . .test.js$", - "test": "c8 pnpm unit && eslint . && pnpm clean && size-limit", + "test": "c8 pnpm unit && pnpm clean && size-limit", "start": "vite test/demo/ --open" }, "engines": { @@ -108,7 +108,7 @@ "name": "Brotli all", "brotli": true, "import": "{ nanoid, customAlphabet, urlAlphabet }", - "limit": "264 B" + "limit": "260 B" }, { "name": "Brotli non-secure",