web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
843 B

  1. # strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent)
  2. > Strip leading whitespace from each line in a string
  3. The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.
  4. Useful for removing redundant indentation.
  5. ## Install
  6. ```
  7. $ npm install strip-indent
  8. ```
  9. ## Usage
  10. ```js
  11. const stripIndent = require('strip-indent');
  12. const string = '\tunicorn\n\t\tcake';
  13. /*
  14. unicorn
  15. cake
  16. */
  17. stripIndent(string);
  18. /*
  19. unicorn
  20. cake
  21. */
  22. ```
  23. ## Related
  24. - [strip-indent-cli](https://github.com/sindresorhus/strip-indent-cli) - CLI for this module
  25. - [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string
  26. ## License
  27. MIT © [Sindre Sorhus](https://sindresorhus.com)