{"name":"@jscpd/finder","version":"4.0.2","author":{"name":"Andrey Kucherenko","email":"kucherenko.andrey@gmail.com"},"license":"MIT","_id":"@jscpd/finder@4.0.2","maintainers":[{"name":"apk","email":"kucherenko.andrey@gmail.com"}],"homepage":"https://github.com/kucherenko/jscpd#readme","bugs":{"url":"https://github.com/kucherenko/jscpd/issues"},"dist":{"shasum":"64047e26ec35f8c38599f0289867c10e69df8cf1","tarball":"http://registry-npm.ywwl.com/@jscpd/finder/download/@jscpd/finder-4.0.2.tgz","fileCount":9,"integrity":"sha512-3R89W424dq1fJTpfwf/Pw3sKutVy5Vw+omkwlPNVHk+i3VVd8JKWZ8qajFhDBsk1T/wk623FsaXwaRgqTZDbZg==","signatures":[{"sig":"MEUCIQDLcT5eiP0qybm9fFnXAjy1zeZHpc/vM31H4Othu8q5mwIgBrJyJwXDXZXeLVX1uQQhafnf5wL2IyRxRTzptPkIqvg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":147669,"size":28613,"noattachment":false,"key":"/@jscpd/finder/-/@jscpd/finder-4.0.2.tgz"},"main":"dist/index.js","_from":"file:jscpd-finder-4.0.2.tgz","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./README.md":"./README.md"},"gitHead":"fa06f839d6c5335a1e9dbf0c7387710fcd42eb54","scripts":{"dev":"nodemon","test":"vitest run","build":"tsup-node --dts","cleanup":"rimraf ./dist .turbo","typecheck":"tsc"},"typings":"dist/index.d.mts","_npmUser":{"name":"apk","email":"kucherenko.andrey@gmail.com"},"_resolved":"/private/var/folders/rh/82vm3q314snd3ymwr5n577_00000gp/T/83574c9c1020ec83c1034d96802ea417/jscpd-finder-4.0.2.tgz","_integrity":"sha512-3R89W424dq1fJTpfwf/Pw3sKutVy5Vw+omkwlPNVHk+i3VVd8JKWZ8qajFhDBsk1T/wk623FsaXwaRgqTZDbZg==","repository":{"url":"git+ssh://git@github.com/kucherenko/jscpd.git","type":"git"},"_npmVersion":"10.9.4","description":"detector of copy/paste in files","directories":{"src":"src","test":"__tests__"},"_nodeVersion":"22.21.1","dependencies":{"pug":"^3.0.3","bytes":"^3.1.2","blamer":"^1.0.6","colors":"^1.4.0","fs-extra":"^11.2.0","fast-glob":"^3.3.2","cli-table3":"^0.6.5","@jscpd/core":"4.0.2","markdown-table":"^2.0.0","@jscpd/tokenizer":"4.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.0.5","nodemon":"^3.1.4","ts-node":"^10.9.2","@types/pug":"^2.0.10","typescript":"^5.5.4","@types/bytes":"^3.1.4","@jscpd/tsconfig":"5.0.2","@types/fs-extra":"^11.0.4","@types/markdown-table":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/finder_4.0.2_1768119073920_0.32196702631337204","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@jscpd/finder`\n\n> 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.\n\nKey exports:\n\n- **`getFilesToDetect(options)`** — resolves the file list from paths, globs, and ignore patterns\n- **`InFilesDetector`** — orchestrates tokenization, store lookup, and clone collection across a file list\n- **Reporters** — `console`, `consoleFull`, `json`, `xml`, `csv`, `markdown`, `xcode`, `ai`, `silent`, `threshold`\n- **Subscribers** — `verbose`, `progress`\n- **Validators** — `skipLocal`\n- **Hooks** — `blamer`, `fragment`\n\n## Installation\n\n```bash\nnpm install @jscpd/finder --save\n```\n\n## Usage\n\n```typescript\nimport { Tokenizer } from '@jscpd/tokenizer';\nimport {\n  MemoryStore,\n  IOptions,\n  IClone,\n  IStore,\n  ITokenizer,\n} from '@jscpd/core';\nimport { EntryWithContent, getFilesToDetect, InFilesDetector } from '@jscpd/finder';\n\nconst options: IOptions = {\n  minLines: 5,\n  maxLines: 500,\n  path: ['list of folders and files to analyse for clones'],\n};\n\nconst tokenizer: ITokenizer = new Tokenizer();\n// any store implementing IStore works here\nconst store: IStore = new MemoryStore();\n\nconst files: EntryWithContent[] = getFilesToDetect(options);\nconst detector = new InFilesDetector(tokenizer, store, options);\n\n(async () => {\n  const clones: IClone[] = await detector.detect(files);\n})();\n```\n\n\n## License\n\n[MIT](LICENSE) © Andrey Kucherenko\n","publish_time":1768119074051,"_cnpm_publish_time":1768119074051,"dist-tags":{"canary":"3.3.0-alpha.8","latest":"4.3.0","rc":"4.0.0"}}