{"name":"@jscpd/finder","version":"4.0.4","author":{"name":"Andrey Kucherenko","email":"kucherenko.andrey@gmail.com"},"license":"MIT","_id":"@jscpd/finder@4.0.4","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":"30be5b35c83fc0ddac8341d4930a48e7be7e9020","tarball":"http://registry-npm.ywwl.com/@jscpd/finder/download/@jscpd/finder-4.0.4.tgz","fileCount":9,"integrity":"sha512-qVUWY7Nzuvfd5OIk+n7/5CM98LmFroLqblRXAI2gDABwZrc7qS+WH2SNr0qoUq0f4OqwM+piiwKvwL/VDNn/Cg==","signatures":[{"sig":"MEUCIQCi6otVUAzax4ADTBcIhbBW9TqjKwDrlvv7ZCTTBGd3iwIgXU1yY8OjaUWExuXQs4Bkdm9fOwB3I65Uzwg/VgYat4A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":144860,"size":27747,"noattachment":false,"key":"/@jscpd/finder/-/@jscpd/finder-4.0.4.tgz"},"main":"dist/index.js","_from":"file:jscpd-finder-4.0.4.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/38/9m750_w54w1b7hlj0l2bg5pm0000gn/T/719a45831b54ca5cba3d28b7c96ed039/jscpd-finder-4.0.4.tgz","_integrity":"sha512-qVUWY7Nzuvfd5OIk+n7/5CM98LmFroLqblRXAI2gDABwZrc7qS+WH2SNr0qoUq0f4OqwM+piiwKvwL/VDNn/Cg==","repository":{"url":"git+ssh://git@github.com/kucherenko/jscpd.git","type":"git"},"_npmVersion":"11.6.2","description":"detector of copy/paste in files","directories":{"src":"src","test":"__tests__"},"_nodeVersion":"22.20.0","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.4","markdown-table":"^2.0.0","@jscpd/tokenizer":"4.0.4"},"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.4","@types/fs-extra":"^11.0.4","@types/markdown-table":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/finder_4.0.4_1769768921246_0.06413642990501112","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":1769768921386,"_cnpm_publish_time":1769768921386,"dist-tags":{"canary":"3.3.0-alpha.8","latest":"4.3.0","rc":"4.0.0"}}