</>PackageGraphPackageGraph

wcwidth

npmv1.0.1

Port of C's wcwidth() and wcswidth()

Not recommended for new projects

No — wcwidth should not be adopted for new projects. Last published 3755 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • FMaintenance: grade F, Failing.

    Last published 3755 days ago.

  • AWeight: grade A, Excellent.

    Pulls in 1 transitive package, about 5.5 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding wcwidth to a project.

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

5.5 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing wcwidth, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
No constraint declared
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the wcwidth README.

'한'.length    // => 1
wcwidth('한');   // => 2

'한글'.length    // => 2
wcwidth('한글'); // => 4

wcwidth vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
wcwidththis page01MIT10 years ago
string-width03MIT1 day ago
is-wsl117.6M4MIT1 day ago
get-east-asian-width69.3M1MIT1 day ago
supports-hyperlinks35.4M1MIT1 day ago
terminal-link18.8M1MIT1 day ago

Dependencies

Declared by wcwidth v1.0.1. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (1)

Dev (1)

tape ^4.5.1

Used by

Popular packages that depend on wcwidth.

Relationship graph

Dependencies (left) and dependents (right) of wcwidth.

defaults@react-native-com…wcwidth
wcwidth dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 658 days apart.

Recent versions of wcwidth
VersionPublishedSizeLicense
1.0.1latest10 years agoMIT
1.0.012 years agoMIT
0.0.012 years agoMIT

Overview

wcwidth is an npm package that port of C's wcwidth() and wcswidth(). It has 1 known dependents in the graph. The latest version is 1.0.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need port of C's wcwidth() and wcswidth() and value a focused solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Clear open-source license (MIT).
  • Lean dependency tree (2 direct dependencies).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use wcwidth?

No — wcwidth should not be adopted for new projects. Last published 3755 days ago.

How do I install wcwidth?

Run `npm install wcwidth` to add wcwidth to your npm project.

How many dependencies does wcwidth have?

wcwidth declares 2 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 5.5 KB on disk.

What license is wcwidth released under?

wcwidth is distributed under the MIT license.

How popular is wcwidth?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on wcwidth.

Is wcwidth still maintained?

The most recent release of wcwidth (v1.0.1) was published 10 years ago.

Does wcwidth run install scripts?

No. wcwidth does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.