# babel-normalize-comments

> Merge comments together into a normalized string

Latest version **1.0.2** (published 2018-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-normalize-comments
pnpm add babel-normalize-comments
yarn add babel-normalize-comments
bun add babel-normalize-comments
```

## 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.2 |
| Published | 2018-03-25 |
| First published | 2017-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | James Kyle |
| Maintainers | lbatchelor, noviny, thejameskyle |
| Keywords | babel, babylon, comments, normalize, whitespace, jsdoc, jsdocs |

## Links

- npm: https://www.npmjs.com/package/babel-normalize-comments
- Repository: https://github.com/babel-utils/babel-normalize-comments
- Homepage: https://github.com/babel-utils/babel-normalize-comments#readme
- Issues: https://github.com/babel-utils/babel-normalize-comments/issues
- npm.io page: https://npm.io/package/babel-normalize-comments

## Dependencies (1)

- [babel-flow-types](https://npm.io/package/babel-flow-types.md) ^1.2.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-03-25
- 1.0.1 — 2017-11-14
- 1.0.0 — 2017-10-27

## README

# babel-normalize-comments

> Merge comments together into a normalized string

Preserves indentation in many different comment styles

## Install

```
yarn add babel-normalize-comments
```

## Usage

```
const babylon = require('babylon');
const { normalizeComments, normalizeComment } = require('babel-normalize-comments');

let ast = babylon.parse(code);

// normalize an array of comment nodes
normalizeComments(ast.comments);

// normalize a single comment node
normalizeComment(ast.comments[0]);
```

See [test.js](test.js) for examples of input and output.

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