Skip to content

Commit 596a8b2

Browse files
committed
Move to console colors from Node.js
1 parent df9bb34 commit 596a8b2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"c8": "^9.1.0",
6161
"clean-publish": "^4.4.0",
6262
"eslint": "^8.57.0",
63-
"picocolors": "^1.0.0",
6463
"rndm": "^1.2.0",
6564
"secure-random-string": "^1.1.3",
6665
"shortid": "^2.2.16",

pnpm-lock.yaml

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/benchmark.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { v4 as lukeed4 } from '@lukeed/uuid'
44
import { v4 as napiV4 } from '@napi-rs/uuid'
55
import benchmark from 'benchmark'
66
import crypto from 'node:crypto'
7-
import pico from 'picocolors'
87
import rndm from 'rndm'
98
import srs from 'secure-random-string'
109
import shortid from 'shortid'
1110
import { uid } from 'uid'
1211
import uidSafe from 'uid-safe'
1312
import { uid as uidSecure } from 'uid/secure'
1413
import { v4 as uuid4 } from 'uuid'
14+
import { styleText } from 'node:util'
1515

1616
import { nanoid as browser } from '../index.browser.js'
1717
import { customAlphabet, nanoid } from '../index.js'
@@ -76,6 +76,8 @@ suite
7676
if (event.target.name === 'uid') {
7777
name = '\nNon-secure:\n' + name
7878
}
79-
process.stdout.write(`${name}${pico.bold(hz)}${pico.dim(' ops/sec')}\n`)
79+
process.stdout.write(
80+
`${name}${styleText('bold', hz)}${styleText('dim', ' ops/sec')}\n`
81+
)
8082
})
8183
.run()

0 commit comments

Comments
 (0)