Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

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
    Github

Version published
Maintainers
2
Weekly downloads
13,017,558
increased by1.13%

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 12,486,286 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

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc