@jscpd/finder
detector of copy/paste in files
Last updated 5 days ago by apk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @jscpd/finder 
SYNC missed versions from official npm registry.

@jscpd/finder

core package for detect duplicates, depends only on eventemmiter3.

Installation

npm install @jscpd/finder --save

Usage

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();
// here you can use any store what implement IStore interface
const store: IStore = new MemoryStore();
const statistic = new Statistic(options);

const files: EntryWithContent[] = getFilesToDetect(options);

const detector = new InFilesDetector(tokenizer, store, statistic, options);

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

ga tracker

License

MIT © Andrey Kucherenko

Current Tags

  • 3.3.0-alpha.8                                ...           canary (a month ago)
  • 3.3.0-rc.8                                ...           latest (5 days ago)

8 Versions

  • 3.3.0-rc.8                                ...           5 days ago
  • 3.3.0-rc.7                                ...           6 days ago
  • 3.3.0-rc.6                                ...           a month ago
  • 3.3.0-rc.5                                ...           a month ago
  • 3.3.0-rc.4                                ...           a month ago
  • 3.3.0-rc.3                                ...           a month ago
  • 3.3.0-alpha.8                                ...           a month ago
  • 3.3.0-alpha.2                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 24
This Month 24
Last Day 0
Last Week 147
Last Month 400
Dependencies (9)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |