// package
string-width
type: "module"
// preferences
// replacements (2)
fast-string-width
Community choiceThis package provides equivalent functionality and has been flagged as more performant.
→ npmx: fast-string-width
Bun.stringWidth
Available nativelyThis feature is available natively by using Bun.stringWidth. No third-party package needed.
→ docs: https://bun.com/docs/runtime/utils#bun-stringwidth
// engine support
runtimes
| engine | min version |
|---|---|
| bun | 1.0.0 |