Skip to main content
Fallow replaces jscpd with a faster, more capable duplication engine and adds dead code analysis on top.

Migration workflow

1

Preview the migration

Run fallow migrate --dry-run to see the generated config without writing anything:
fallow migrate --dry-run
Fallow searches for .jscpd.json and the jscpd field in package.json.
2

Generate the config

Once you’re happy with the preview, run the migration:
fallow migrate            # Write .fallowrc.json
fallow migrate --toml     # Or output as fallow.toml
3

Review the config

Open the generated config and verify the translated thresholds, token counts, and ignore patterns.
4

Run fallow dupes

Run your first duplication analysis:
fallow dupes
The default mild mode is closest to jscpd’s behavior. For exact token matching like jscpd, use --mode strict.

What gets migrated

jscpdfallow
thresholdduplicates.threshold
minTokensduplicates.minTokens
minLinesduplicates.minLines
ignoreignorePatterns
format— (fallow auto-detects languages)

Comparison

fallowjscpd
Speed (real-world)20—33x fasterBaseline
Detection modes4 (strict, mild, weak, semantic)1 (token-based)
AlgorithmSuffix array with LCPRabin-Karp rolling hash
Dead code integrationBuilt-in (fallow check)Not included
Clone familiesYes, with refactoring suggestionsNo
Cross-languageTS to JS type strippingFormat-based
Baseline trackingYesNo
Runtime dependencyNoneNode.js

Detection mode mapping

jscpd uses a single token-based detection mode. The closest fallow equivalent is mild (the default), which normalizes syntax variations. For stricter matching (like jscpd), use strict mode:
fallow dupes --mode strict
For broader matching that catches renamed variables:
fallow dupes --mode semantic

Replace two tools with one

Fallow includes both dead code analysis and duplication detection, so you can replace both jscpd and knip with a single tool.
fallow check    # Dead code (replaces knip)
fallow dupes    # Duplication (replaces jscpd)

See also

Duplication analysis

Deep dive into fallow’s duplication detection engine.

fallow dupes

Full CLI reference for the dupes command.