basant307/AI_Governance_Project
045
1# strip-indent2 3> Strip leading whitespace from each line in a string4 5The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.6 7Useful for removing redundant indentation.8 9## Install10 11```sh12npm install strip-indent13```14 15## Usage16 17```js18import stripIndent from 'strip-indent';19 20const string = '\tunicorn\n\t\tcake';21/*22 unicorn23 cake24*/25 26stripIndent(string);27/*28unicorn29 cake30*/31```32 33## API34 35### stripIndent(string)36 37Strip leading whitespace from each line in a string.38 39The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.40 41### dedent(string)42 43Strip leading whitespace from each line in a string and remove surrounding blank lines.44 45Like `stripIndent()`, but also removes leading and trailing lines that contain only whitespace. Useful for template literals and multi-line strings where you want clean boundaries.46 47```js48import {dedent} from 'strip-indent';49 50dedent(`51 unicorn52 cake53`);54/*55unicorn56 cake57*/58```59 60## Related61 62- [strip-indent-cli](https://github.com/sindresorhus/strip-indent-cli) - CLI for this module63- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string64- [redent](https://github.com/sindresorhus/redent) - Strip redundant indentation and indent the string65 