</>PackageGraphPackageGraph

word-wrap

npmv1.2.5TypeScript

Wrap words to a specified length.

Not recommended for new projects

No — word-wrap should not be adopted for new projects. Last published 1145 days ago.

  • AAdoption: grade A, Excellent.

    93.2M downloads per week and 1 known dependents.

  • FMaintenance: grade F, Failing.

    Last published 1145 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 12 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 2 maintainers, and a contained dependency surface.

  • 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 word-wrap to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

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

12 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=0.10.0
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the word-wrap README.

var wrap = require('word-wrap');

wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');

word-wrap vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
word-wrapthis page93.2M1MIT3 years ago
indent-string94M2MIT1 day ago
detect-newline01MIT1 day ago
index-to-position01MIT1 day ago
cliui212.4M1ISC1 day ago
callsites136.7M1MIT1 day ago

Dependencies

Declared by word-wrap v1.2.5. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (2)

gulp-format-md ^0.1.11mocha ^3.2.0

Used by

Popular packages that depend on word-wrap.

Relationship graph

Dependencies (left) and dependents (right) of word-wrap.

optionatorword-wrap
word-wrap dependencies dependents

Frequently installed together

Release history

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

Recent versions of word-wrap
VersionPublishedSizeLicense
1.2.5latest3 years ago12 KBMIT
1.2.43 years ago12 KBMIT
1.2.39 years agoMIT
1.2.29 years agoMIT
1.2.19 years agoMIT
1.2.09 years agoMIT
1.1.011 years agoMIT
1.0.311 years agoMIT
1.0.211 years agoMIT
1.0.111 years agoMIT
1.0.011 years agoMIT
0.3.111 years agoMIT
0.3.011 years agoMIT
0.2.011 years agoMIT
0.1.312 years agoMIT

Overview

word-wrap is an npm package that wrap words to a specified length. It is extremely widely used, with about 93.2M downloads per week and 1 known dependents in the graph. The latest version is 1.2.5, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need wrap words to a specified length and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (93.2M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).
  • Lean dependency tree (2 direct dependencies).

Cons

  • No significant drawbacks detected from available metadata.

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

Maintainers

Keywords

Frequently asked questions

Should I use word-wrap?

No — word-wrap should not be adopted for new projects. Last published 1145 days ago.

How do I install word-wrap?

Run `npm install word-wrap` to add word-wrap to your npm project.

What license is word-wrap released under?

word-wrap is distributed under the MIT license.

How popular is word-wrap?

word-wrap has approximately 93,204,291 downloads per week and 1 known dependent packages.

Is word-wrap still maintained?

The most recent release of word-wrap (v1.2.5) was published 3 years ago.

Does word-wrap run install scripts?

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