4.0.1 • Published 1 year ago
@jscpd/finder v4.0.1
@jscpd/finder
core package for detect duplicates, depends only on eventemitter3.
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);
})();
License
MIT © Andrey Kucherenko
4.0.1
1 year ago
4.0.0
1 year ago
3.5.10
2 years ago
3.5.5
2 years ago
3.5.4
2 years ago
3.5.1
3 years ago
3.5.0
3 years ago
3.4.5
4 years ago
3.4.1
4 years ago
3.3.26
4 years ago
3.3.25
4 years ago
3.3.24
4 years ago
3.3.23
5 years ago
3.3.20
5 years ago
3.3.21
5 years ago
3.3.19
5 years ago
3.3.17
5 years ago
3.3.14
5 years ago
3.3.13
5 years ago
3.3.11
5 years ago
3.3.9
5 years ago
3.3.8
5 years ago
3.3.3
5 years ago
3.3.2
5 years ago
3.3.1
5 years ago
3.3.0-rc.10
5 years ago
3.3.0-rc.8
5 years ago
3.3.0-rc.7
5 years ago
3.3.0-rc.6
5 years ago
3.3.0-rc.5
5 years ago
3.3.0-rc.4
5 years ago
3.3.0-rc.3
5 years ago
3.3.0-alpha.8
5 years ago
3.3.0-alpha.2
5 years ago