# scan-deps

> util to detect undeclared deps and phantom deps

Latest version **0.2.0** (published 2023-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install scan-deps
pnpm add scan-deps
yarn add scan-deps
bun add scan-deps
```

Provides the command `scan-deps`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-08-12 |
| First published | 2021-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 7 |
| Unpacked size | 65.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Cheng Liu |
| Maintainers | chengcyber |
| Keywords | scan, phantom, dependencies |

## Links

- npm: https://www.npmjs.com/package/scan-deps
- Repository: https://github.com/chengcyber/scan-deps
- npm.io page: https://npm.io/package/scan-deps

## Dependencies (7)

- [glob](https://npm.io/package/glob.md) ^7.1.7
- [tslib](https://npm.io/package/tslib.md) ~2.3.0
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [commander](https://npm.io/package/commander.md) ^7.2.0
- [builtin-modules](https://npm.io/package/builtin-modules.md) ^3.2.0
- [@definitelytyped/utils](https://npm.io/package/@definitelytyped/utils.md) ^0.0.85
- [@definitelytyped/header-parser](https://npm.io/package/@definitelytyped/header-parser.md) ^0.0.85

## Recent versions

- 0.2.0 (latest) — 2023-08-12
- 0.1.2 — 2022-03-03
- 0.1.1 — 2022-01-14
- 0.1.0 — 2021-08-13
- 0.0.4 — 2021-08-11
- 0.0.3 — 2021-08-11
- 0.0.2 — 2021-08-11
- 0.0.1 — 2021-08-11

## README

# scan-deps

util to detect undeclared deps and phantom deps

# Usage

1. CLI

```
npx scan-deps
```

```
Usage: scan-deps [options]

Options:
  -V, --version  output the version number
  --json         output as json
  --debug        turn on debug log
  --all          output all dependencies includes detected
                 dependencies
  --directory    directory included, default: src,lib
  --extension    included file extensions, default:
                 ts,js,tsx,jsx
  -h, --help     display help for command
```

2. Node API

```js
import { scanDeps } from "scan-deps";

async function main() {
  const { detectedDependencies, missingDependencies, unusedDependencies } =
    await scanDeps({
      // cwd: process.cwd(),
      // directory: 'src,lib',
      // extension: 'ts,js,tsx,jsx',
    });
}
```

# Development

```
yarn install
yarn build:watch
```

# LICENSE

MIT @[chengcyber](https://github.com/chengcyber)

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