hz-zhhq-web/node_modules/strip-indent
zzyuan 01c6571b37 前端提交5 2025-02-25 13:47:09 +08:00
..
index.js 前端提交5 2025-02-25 13:47:09 +08:00
license 前端提交5 2025-02-25 13:47:09 +08:00
package.json 前端提交5 2025-02-25 13:47:09 +08:00
readme.md 前端提交5 2025-02-25 13:47:09 +08: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 --save strip-indent

Usage

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

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

stripIndent('\tunicorn\n\t\tcake');
/*
unicorn
	cake
*/

License

MIT © Sindre Sorhus