# solidity-comments-extractor

> Extract comments from Solidity code

Latest version **0.0.8** (published 2023-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install solidity-comments-extractor
pnpm add solidity-comments-extractor
yarn add solidity-comments-extractor
bun add solidity-comments-extractor
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2023-12-15 |
| First published | 2020-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | mattiaerre, fvictorio |

## Links

- npm: https://www.npmjs.com/package/solidity-comments-extractor
- Repository: https://github.com/prettier-solidity/solidity-comments-extractor
- Issues: https://github.com/prettier-solidity/solidity-comments-extractor/issues
- npm.io page: https://npm.io/package/solidity-comments-extractor

## Recent versions

- 0.0.8 (latest) — 2023-12-15
- 0.0.7 — 2021-04-21
- 0.0.6 — 2021-04-10
- 0.0.5 — 2021-04-07
- 0.0.4 — 2020-11-15
- 0.0.3 — 2020-11-15
- 0.0.2 — 2020-11-15
- 0.0.1 — 2020-11-15

## README

# solidity-comments-extractor

Extract comments from Solidity code

## How to

```js
const expect = require('expect');
const extractComments = require('./index');

const code = `
// this is a contract
contract Foo {
}
`;

const comments = extractComments(code);

expect(comments).toEqual([
  {
    range: [1, 22],
    raw: ' this is a contract',
    type: 'LineComment',
    value: ' this is a contract'
  }
]);
```

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