Guides

Guides

Longer reads on duplicate detection and how to use jscpd well.

Overview

Reference pages tell you what a flag does. Guides explain when to use it.

GuideWhat it covers
Types of Code ClonesExact, renamed, near-miss and semantic clones (Type-1 to Type-4), which of them jscpd finds, and which flag or mode to use for each
How Detection WorksHow jscpd reads each language by its own syntax before matching: per-format tokenization, the oxc parser for JavaScript and TypeScript, embedded languages, normalization and Rabin-Karp matching
Project Dashboard--dashboard prints the health badge, project size, duplication by clone kind, the most complex files and dead code on one screen (5.3.0+)
Project Health Score--health folds duplication, dead code and complexity into one size-aware 0-100 score with a grade, extensible with coverage, test and security metrics (5.3.0+)
Duplication Trend over Git History--history scans every commit in a range and charts the duplication percentage, with the change between points and how far --threshold could be tightened (5.2.1+)