ICT30016-Assignment-3/node_modules/strip-indent
dlawler489 a79a6afd34 intial
intial
2025-09-16 12:09:52 +10:00
..
index.d.ts intial 2025-09-16 12:09:52 +10:00
index.js intial 2025-09-16 12:09:52 +10:00
license intial 2025-09-16 12:09:52 +10:00
package.json intial 2025-09-16 12:09:52 +10:00
readme.md intial 2025-09-16 12:09:52 +10:00

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