You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gaoshuguang 919158d97c 首次提交 2 years ago
..
index.d.ts 首次提交 2 years ago
index.js 首次提交 2 years ago
license 首次提交 2 years ago
package.json 首次提交 2 years ago
readme.md 首次提交 2 years ago

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