npm install @jscpd/badge-reporter
jscpd --reporters badge ./src
Generates an SVG badge showing duplication percentage:
After generating the badge:

{ "reporters": ["badge", "console"], "output": "./badges" }
JSON Reporter
Generate JSON reports for CI/CD integration.
API
Use jscpd programmatically in your applications.
On this page
Community