Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

strip-indent

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Issues
File Explorer

Advanced tools

strip-indent

Strip leading whitespace from each line in a string

    4.0.0latest

Version published
Maintainers
1
Weekly downloads
20,523,067
decreased by-0.77%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12 bbc7f4c
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/strip-indent/compare/v3.0.0...v4.0.0

Readme

Source

strip-indent

Strip leading whitespace from each line in a string

The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.

Useful for removing redundant indentation.

Install

$ npm install strip-indent

Usage

import stripIndent from 'strip-indent'; const string = '\tunicorn\n\t\tcake'; /* unicorn cake */ stripIndent(string); /* unicorn cake */
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is strip-indent?

Strip leading whitespace from each line in a string

Is strip-indent popular?

The npm package strip-indent receives a total of 19,687,358 weekly downloads. As such, strip-indent popularity was classified as popular.

Is strip-indent well maintained?

We found that strip-indent demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 03 May 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc