Skip to content

Commit

Permalink
Merge after 3.3.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Nov 26, 2024
2 parents cdc3edc + 3044cd5 commit b00d120
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- v3
pull_request:
permissions:
contents: read
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
* Removed Node.js 10 and Node.js 12 support.
* Reduced npm package size.

## 3.3.8
* Fixed a way to brake Nano ID by passing non-integer size (by @myndzi).

## 3.3.7
* Fixed `node16` TypeScript support (by Saadi Myftija).

Expand Down
2 changes: 1 addition & 1 deletion index.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export let customRandom = (alphabet, defaultSize, getRandom) => {
while (true) {
let bytes = getRandom(step)
// A compact alternative for `for (var i = 0; i < step; i++)`.
let j = step
let j = step | 0
while (j--) {
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
id += alphabet[bytes[j] & mask] || ''
Expand Down

0 comments on commit b00d120

Please sign in to comment.