conventional-changelog-action/node_modules/strip-indent
Conventional Changelog Action e038437ad0 chore(release): v3.9.2 2021-10-05 21:28:17 +00:00
..
index.d.ts chore(release): v3.9.2 2021-10-05 21:28:17 +00:00
index.js chore(release): v3.9.2 2021-10-05 21:28:17 +00:00
license chore(release): v3.9.2 2021-10-05 21:28:17 +00:00
package.json chore(release): v3.9.2 2021-10-05 21:28:17 +00:00
readme.md chore(release): v3.9.2 2021-10-05 21:28:17 +00:00

readme.md

strip-indent Build Status

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

const stripIndent = require('strip-indent');

const string = '\tunicorn\n\t\tcake';
/*
	unicorn
		cake
*/

stripIndent(string);
/*
unicorn
	cake
*/

License

MIT © Sindre Sorhus