{"name":"@jscpd/core","version":"4.1.0","author":{"name":"Andrey Kucherenko","email":"kucherenko.andrey@gmail.com"},"license":"MIT","_id":"@jscpd/core@4.1.0","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":"794ae974cf03ed956ce1f9b1a40545fc8f21233e","tarball":"http://registry-npm.ywwl.com/@jscpd/core/download/@jscpd/core-4.1.0.tgz","fileCount":9,"integrity":"sha512-6hnibDeLfIWS5Dfy1V/CUf2CijszSe1Z2dNymfqwGK1BDqGaaXqXU3WMZzL0Us131rGLIqqExjfQrBGDQ940TA==","signatures":[{"sig":"MEQCIBlvYwzsEfXGB+fSnzyCCJfuZBX6vCbHHWUhTZRBlOUfAiBREKAUalAAP7yt+GhtgBZEdEfo/Es1fB3j1c4XZHPz/g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90131,"size":16034,"noattachment":false,"key":"/@jscpd/core/-/@jscpd/core-4.1.0.tgz"},"main":"dist/index.js","_from":"file:jscpd-core-4.1.0.tgz","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./README.md":"./README.md"},"gitHead":"beaae8ee77d5c7f41d2a0c65187887bd0dc87148","scripts":{"dev":"nodemon","build":"tsup-node --dts","cleanup":"rimraf ./dist .turbo","test:dev":"vitest","typecheck":"tsc"},"typings":"dist/index.d.mts","_npmUser":{"name":"apk","email":"kucherenko.andrey@gmail.com"},"_resolved":"/private/var/folders/rh/82vm3q314snd3ymwr5n577_00000gp/T/cf27fececb7fd3d4995e847179366de5/jscpd-core-4.1.0.tgz","_integrity":"sha512-6hnibDeLfIWS5Dfy1V/CUf2CijszSe1Z2dNymfqwGK1BDqGaaXqXU3WMZzL0Us131rGLIqqExjfQrBGDQ940TA==","repository":{"url":"git+ssh://git@github.com/kucherenko/jscpd.git","type":"git"},"_npmVersion":"11.11.0","description":"core functionality of copy/paste detector for jscpd","directories":{"lib":"dist","test":"__tests__"},"_nodeVersion":"25.8.1","dependencies":{"eventemitter3":"^5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.0.5","nodemon":"^3.1.4","@types/node":"^22.5.2","@jscpd/tsconfig":"5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_4.1.0_1778351019575_0.06126697429903083","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@jscpd/core`\n\n> core package for detect duplicates, depends only on eventemitter3.\n\n## Installation\n\n```\nnpm install @jscpd/core --save\n```\n\n## Usage\n\n```typescript\nimport {Tokenizer} from '@jscpd/tokenizer';\nimport {\n    Detector,\n    MemoryStore,\n    IOptions,\n    IClone,\n    IStore,\n    ITokenizer\n} from '@jscpd/core';\n\nconst options: IOptions = {\n    minLines: 5,\n    maxLines: 500,\n}\n\nconst tokenizer: ITokenizer = new Tokenizer();\n\n// here you can use any store what implement IStore interface\nconst store: IStore = new MemoryStore();\n\n// list of validators, implemented IValidator interface, validate clones\nconst validators = [];\n\nconst detector = new Detector(tokenizer, store, validators, options);\n\n( async () => {\n    const format = 'javascript';\n    const code: string = '...string with code...';\n    const clones: IClone[] = await detector.detect('source_id', code, format);\n\n    console.log(clones);\n})();\n\n```\n\n![ga tracker](https://www.google-analytics.com/collect?v=1&a=257770996&t=pageview&dl=https%3A%2F%2Fgithub.com%2Fkucherenko%2Fjscpd&ul=en-us&de=UTF-8&cid=978224512.1377738459&tid=UA-730549-17&z=887657232 \"ga tracker\")\n\n## License\n\n[MIT](LICENSE) © Andrey Kucherenko\n","publish_time":1778351019714,"_cnpm_publish_time":1778351019714,"dist-tags":{"canary":"3.3.0-alpha.8","latest":"4.2.5","next":"3.5.10","rc":"4.0.0"}}