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..cd0099e1 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "name": "Brotli all", "brotli": true, "import": "{ nanoid, customAlphabet, urlAlphabet }", - "limit": "264 B" + "limit": "260 B" }, { "name": "Brotli non-secure",