Skip to content

Commit

Permalink
Merge branch 'main' into Issue--ai#481-Move-benchmark-to-tibybench
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 25, 2024
2 parents 15b8e57 + 51659b4 commit b20ab94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"

---

<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" />  Сделано в <b><a href="https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github">Злых марсианах</a></b>, продуктовом консалитнге для <b>инструментов разработки</b>.
<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" />  Сделано в <b><a href="https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github">Злых марсианах</a></b>, продуктовом консалтинге для <b>инструментов разработки</b>.

---

Expand Down Expand Up @@ -146,7 +146,7 @@ Nano ID 5 работает только с ESM-проектами, в теста
node --experimental-require-module app.js
```

Или возьмите Nano ID 3.x (мы ещё всё ещё поддерживаем):
Или возьмите Nano ID 3.x (мы его всё ещё поддерживаем):

```bash
npm install nanoid@3
Expand Down
8 changes: 4 additions & 4 deletions test/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { nanoid as browser } from '../index.browser.js'
import { customAlphabet, nanoid } from '../index.js'
import { nanoid as nonSecure } from '../non-secure/index.js'

let suite = new Bench()
let bench = new Bench()

let nanoid2 = customAlphabet('1234567890abcdef-', 10)

Expand All @@ -27,7 +27,7 @@ function formatNumber(number) {
.replace(/^(\d|\d\d)(\d{3},)/, '$1,$2')
}

suite
bench
.add('crypto.randomUUID', () => {
crypto.randomUUID()
})
Expand Down Expand Up @@ -81,5 +81,5 @@ suite
)
})

await suite.warmup();
await suite.run();
await bench.warmup()
await bench.run()

0 comments on commit b20ab94

Please sign in to comment.