indent-string
npmv5.0.0Indent each line in a string
Overview
indent-string is an npm package that indent each line in a string. It is extremely widely used, with about 106.7M downloads per week and 1 known dependents in the graph. The latest version is 5.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need indent each line in a string and value a battle-tested, widely-adopted 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
- Large, well-established user base (106.7M weekly downloads).
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of indent-string.
Dependencies
Dev (3)
Used by
Popular packages that depend on indent-string.
Alternatives to indent-string
Convert a string index to its line and column position
Strip leading whitespace from each line in a string
Strip redundant indentation and indent the string
Split a string on the first occurance of a given separator
Get the line and column number of a specific character in a string
Determine the East Asian Width of a Unicode character
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Wrap words to a specified length.
Measure the difference between two strings using the Levenshtein distance algorithm
Strip UTF-8 byte order mark (BOM) from a string
Escape RegExp special characters
Frequently installed together
Version history
| Version | Published | License |
|---|---|---|
| 5.0.0latest | 5 years ago | MIT |
| 4.0.0 | 7 years ago | MIT |
| 3.2.0 | 9 years ago | MIT |
| 3.1.0 | 9 years ago | MIT |
| 3.0.0 | 10 years ago | MIT |
| 2.1.0 | 11 years ago | MIT |
| 2.0.0 | 11 years ago | MIT |
| 1.2.2 | 11 years ago | MIT |
| 1.2.1 | 11 years ago | MIT |
| 1.2.0 | 11 years ago | MIT |
| 1.1.0 | 12 years ago | MIT |
| 1.0.0 | 12 years ago | MIT |
| 0.1.3 | 12 years ago | MIT |
| 0.1.2 | 12 years ago | MIT |
| 0.1.1 | 12 years ago | MIT |
| 0.1.0 | 12 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install indent-string?
Run `npm install indent-string` to add indent-string to your npm project.
What license is indent-string released under?
indent-string is distributed under the MIT license.
How popular is indent-string?
indent-string has approximately 106,711,871 downloads per week and 1 known dependent packages.