conventional-changelog-action/node_modules/strip-indent
Conventional Changelog Action bf7e9cbfcd chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
..
index.d.ts chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
index.js chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
license chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
package.json chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
readme.md chore(release): v3.1.1 2020-07-13 17:58:28 +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