# @jscpd/finder

> detector of copy/paste in files

Latest version **4.3.0** (published 2026-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jscpd/finder
pnpm add @jscpd/finder
yarn add @jscpd/finder
bun add @jscpd/finder
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.3.0 |
| Published | 2026-08-13 |
| First published | 2020-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 209 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6358 |
| Author | Andrey Kucherenko |
| Maintainers | apk |

## Links

- npm: https://www.npmjs.com/package/@jscpd/finder
- Repository: https://github.com/kucherenko/jscpd
- Homepage: https://jscpd.dev
- Issues: https://github.com/kucherenko/jscpd/issues
- npm.io page: https://npm.io/package/@jscpd/finder

## Dependencies (10)

- [pug](https://npm.io/package/pug.md) ^3.0.4
- [bytes](https://npm.io/package/bytes.md) ^3.1.2
- [blamer](https://npm.io/package/blamer.md) ^1.0.6
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.6
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.3.2
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.5
- [@jscpd/core](https://npm.io/package/@jscpd/core.md) 4.2.5
- [markdown-table](https://npm.io/package/markdown-table.md) ^2.0.0
- [@jscpd/tokenizer](https://npm.io/package/@jscpd/tokenizer.md) 4.2.6

## Recent versions

- 4.3.0 (latest) — 2026-08-13
- 4.0.0 (rc) — 2024-05-26
- 3.3.0-alpha.8 (canary) — 2020-04-29
- 4.2.5 — 2026-06-07
- 4.2.4 — 2026-05-25
- 4.2.3 — 2026-05-17
- 4.2.2 — 2026-05-15
- 4.2.1 — 2026-05-15
- 4.2.0 — 2026-05-14
- 4.1.1 — 2026-05-12
- 4.1.0 — 2026-05-09
- 4.0.5 — 2026-04-10
- 4.0.4 — 2026-01-30
- 4.0.3 — 2026-01-11
- 4.0.2 — 2026-01-11
- … 32 more at https://npm.io/package/@jscpd/finder/versions

## README

# `@jscpd/finder`

> File discovery and in-files detection package for [jscpd](https://github.com/kucherenko/jscpd) — walks the filesystem to collect source files, runs the duplicate detector across them, and provides built-in reporters, subscribers, validators, and hooks.

Key exports:

- **`getFilesToDetect(options)`** — resolves the file list from paths, globs, and ignore patterns
- **`InFilesDetector`** — orchestrates tokenization, store lookup, and clone collection across a file list
- **Reporters** — `console`, `consoleFull`, `json`, `xml`, `csv`, `markdown`, `xcode`, `ai`, `silent`, `threshold`
- **Subscribers** — `verbose`, `progress`
- **Validators** — `skipLocal`
- **Hooks** — `blamer`, `fragment`

## Installation

```bash
npm install @jscpd/finder --save
```

## Usage

```typescript
import { Tokenizer } from '@jscpd/tokenizer';
import {
  MemoryStore,
  IOptions,
  IClone,
  IStore,
  ITokenizer,
} from '@jscpd/core';
import { EntryWithContent, getFilesToDetect, InFilesDetector } from '@jscpd/finder';

const options: IOptions = {
  minLines: 5,
  maxLines: 500,
  path: ['list of folders and files to analyse for clones'],
};

const tokenizer: ITokenizer = new Tokenizer();
// any store implementing IStore works here
const store: IStore = new MemoryStore();

const files: EntryWithContent[] = getFilesToDetect(options);
const detector = new InFilesDetector(tokenizer, store, options);

(async () => {
  const clones: IClone[] = await detector.detect(files);
})();
```


## License

[MIT](LICENSE) © Andrey Kucherenko

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