strip-indent
npmv4.1.1TypeScriptStrip leading whitespace from each line in a string
Overview
strip-indent is an npm package that strip leading whitespace from each line in a string. It is extremely widely used, with about 80.4M downloads per week and 1 known dependents in the graph. The latest version is 4.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need strip leading whitespace from 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 or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (80.4M 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.
Relationship graph
Dependencies (left) and dependents (right) of strip-indent.
Dependencies
Dev (2)
Used by
Popular packages that depend on strip-indent.
Alternatives to strip-indent
Strip redundant indentation and indent the string
Strip UTF-8 byte order mark (BOM) from a string
Strip comments from JSON. Lets you use comments in your JSON files!
Indent each line in a string
Escape RegExp special characters
Extract the non-magic parent path from a glob string.
Modify strings, generate sourcemaps
Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
Parse String to Number based on configuration
A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.
Split a string on the first occurance of a given separator
Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to ASCII numerals. Zero dependencies, performance-first.
Frequently installed together
Version history
| Version | Published | License |
|---|---|---|
| 4.1.1latest | 9 months ago | MIT |
| 4.1.0 | 10 months ago | MIT |
| 4.0.0 | 5 years ago | MIT |
| 3.0.0 | 7 years ago | MIT |
| 2.0.0 | 10 years ago | MIT |
| 1.0.1 | 11 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 strip-indent?
Run `npm install strip-indent` to add strip-indent to your npm project.
What license is strip-indent released under?
strip-indent is distributed under the MIT license.
How popular is strip-indent?
strip-indent has approximately 80,444,549 downloads per week and 1 known dependent packages.