mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 14:14:36 +08:00
This also adds CC-BY-4.0 to the list of accepted licenses. DISABLE_THIRD_PARTY_CHECK=update dependencies Bug: chromium:1083142 Change-Id: I8612de2fba52dae32eeb71af79d5aacfde52142b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220097 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org>
62 lines
917 B
Markdown
62 lines
917 B
Markdown
# redent [](https://travis-ci.org/sindresorhus/redent)
|
|
|
|
> [Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string)
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install redent
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
const redent = require('redent');
|
|
|
|
redent('\n foo\n bar\n', 1);
|
|
//=> '\n foo\n bar\n'
|
|
```
|
|
|
|
|
|
## API
|
|
|
|
### redent(string, [count], [options])
|
|
|
|
#### string
|
|
|
|
Type: `string`
|
|
|
|
The string to normalize indentation.
|
|
|
|
#### count
|
|
|
|
Type: `number`<br>
|
|
Default: `0`
|
|
|
|
How many times you want `options.indent` repeated.
|
|
|
|
#### options
|
|
|
|
Type: `object`
|
|
|
|
##### indent
|
|
|
|
Type: `string`<br>
|
|
Default: `' '`
|
|
|
|
The string to use for the indent.
|
|
|
|
##### includeEmptyLines
|
|
|
|
Type: `boolean`<br>
|
|
Default: `false`
|
|
|
|
Also indent empty lines.
|
|
|
|
|
|
## License
|
|
|
|
MIT © [Sindre Sorhus](https://sindresorhus.com)
|