# reindent

> Reindent and trim code

Latest version **1.0.4** (published 2015-03-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install reindent
pnpm add reindent
yarn add reindent
bun add reindent
```

Provides the command `reindent`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2015-03-04 |
| First published | 2015-03-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | chunpu |
| Maintainers | ftft1885 |
| Keywords | reindent |

## Links

- npm: https://www.npmjs.com/package/reindent
- Repository: https://github.com/chunpu/reindent
- Issues: https://github.com/chunpu/reindent/issues
- npm.io page: https://npm.io/package/reindent

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^0.9.0
- [min-util](https://npm.io/package/min-util.md) ^1.2.2
- [commander](https://npm.io/package/commander.md) ^2.6.0
- [require-dir](https://npm.io/package/require-dir.md) ^0.1.0

## Recent versions

- 1.0.4 (latest) — 2015-03-04
- 1.0.3 — 2015-03-04
- 1.0.2 — 2015-03-04
- 1.0.1 — 2015-03-04
- 1.0.0 — 2015-03-04

## README

reindent
===

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][downloads-url]
[![Dependency Status][david-image]][david-url]
[npm-image]: https://img.shields.io/npm/v/reindent.svg?style=flat-square
[npm-url]: https://npmjs.org/package/reindent
[downloads-image]: http://img.shields.io/npm/dm/reindent.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/reindent
[david-image]: http://img.shields.io/david/chunpu/reindent.svg?style=flat-square
[david-url]: https://david-dm.org/chunpu/reindent


Reindent and trim code

Installation
---

```sh
npm i reindent -g
```

Usage
---

> God! it is too complex, close this project!

```sh
reindent *.js *.json
```

complex usage

```sh
find . -name '*.js' -exec reindent {} +
```

Option
---

```sh
  Usage: reindent [options] <file ...>

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -i, --in-place  edit files in place like sed -i
    -v, --verbose   verbose info
    --indent [val]  code indent, default is tab
```

Support
---

- javascript
- json

Don't support below

```js
if ()
	code
```

use

```js
if () code
```

or 

```js
if () {
	code
}
```

Don't write open bracket at the end of comment

```js
// something {
// it will be indented
```

License
---

[![License][license-image]][license-url]

[license-image]: http://img.shields.io/npm/l/reindent.svg?style=flat-square
[license-url]: #

---
_Source: https://npm.io/package/reindent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
