word-wrap
npmv1.2.5TypeScriptWrap 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| word-wrapthis page | 93.2M | 1 | MIT | 3 years ago |
| indent-string | 94M | 2 | MIT | 1 day ago |
| detect-newline | 0 | 1 | MIT | 1 day ago |
| index-to-position | 0 | 1 | MIT | 1 day ago |
| cliui | 212.4M | 1 | ISC | 1 day ago |
| callsites | 136.7M | 1 | MIT | 1 day ago |
Dependencies
Declared by word-wrap v1.2.5. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on word-wrap.
Relationship graph
Dependencies (left) and dependents (right) of word-wrap.
Frequently installed together
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
node's assert.deepEqual algorithm except for NaN being equal to NaN
type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.
Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
Release history
No releases in the last two years, typically about 32 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.5latest | 3 years ago | 12 KB | MIT |
| 1.2.4 | 3 years ago | 12 KB | MIT |
| 1.2.3 | 9 years ago | — | MIT |
| 1.2.2 | 9 years ago | — | MIT |
| 1.2.1 | 9 years ago | — | MIT |
| 1.2.0 | 9 years ago | — | MIT |
| 1.1.0 | 11 years ago | — | MIT |
| 1.0.3 | 11 years ago | — | MIT |
| 1.0.2 | 11 years ago | — | MIT |
| 1.0.1 | 11 years ago | — | MIT |
| 1.0.0 | 11 years ago | — | MIT |
| 0.3.1 | 11 years ago | — | MIT |
| 0.3.0 | 11 years ago | — | MIT |
| 0.2.0 | 11 years ago | — | MIT |
| 0.1.3 | 12 years ago | — | MIT |
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
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.