Big update!Introducing GitHub Bot Commands. Learn more
Socket
BlogLoveLog in
Book a demo

min-indent

Package Overview
Dependencies
0
Maintainers
2
Versions
2
Issues
File Explorer

Advanced tools

min-indent

Get the shortest leading whitespace from lines in a string

    1.0.1latest

Version published
Maintainers
2
Weekly downloads
12,325,180
increased by3.42%

Weekly downloads

Readme

Source

min-indent Build Status

Get the shortest leading whitespace from lines in a string

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

Useful for removing redundant indentation.

Install

$ npm install --save min-indent

Usage

const minIndent = require('min-indent'); const str = '\tunicorn\n\t\tcake'; /* unicorn cake */ minIndent(str); // 1

License

MIT © James Kyle

Keywords

FAQs

What is min-indent?

Get the shortest leading whitespace from lines in a string

Is min-indent popular?

The npm package min-indent receives a total of 11,852,096 weekly downloads. As such, min-indent popularity was classified as popular.

Is min-indent well maintained?

We found that min-indent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 2 open source maintainers collaborating on the project.

Last updated on 28 May 2020
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