[{"data":1,"prerenderedAt":984},["ShallowReactive",2],{"navigation_docs":3,"-guides-cross-format":239,"-guides-cross-format-surround":979},[4,29,94,114,184],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"icon":6,"path":96,"stem":97,"children":98,"page":6},"Concepts","\u002Fconcepts","3.concepts",[99,104,109],{"title":100,"path":101,"stem":102,"icon":103},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":105,"path":106,"stem":107,"icon":108},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":110,"path":111,"stem":112,"icon":113},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":115,"icon":6,"path":116,"stem":117,"children":118,"page":6},"Reference","\u002Freference","4.reference",[119,124,129,134,171,176,180],{"title":120,"path":121,"stem":122,"icon":123},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":125,"path":126,"stem":127,"icon":128},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":130,"path":131,"stem":132,"icon":133},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":135,"icon":6,"path":136,"stem":137,"children":138},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[139,141,146,151,156,161,166],{"title":135,"path":136,"stem":137,"icon":140},"i-lucide-file-chart-column",{"title":142,"path":143,"stem":144,"icon":145},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":147,"path":148,"stem":149,"icon":150},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":152,"path":153,"stem":154,"icon":155},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":157,"path":158,"stem":159,"icon":160},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":162,"path":163,"stem":164,"icon":165},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":167,"path":168,"stem":169,"icon":170},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":172,"path":173,"stem":174,"icon":175},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":177,"path":178,"stem":179,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":181,"path":182,"stem":183,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":185,"icon":6,"path":186,"stem":187,"children":188,"page":6},"Project","\u002Fproject","5.project",[189,194,199,204,229,234],{"title":190,"path":191,"stem":192,"icon":193},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":195,"path":196,"stem":197,"icon":198},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":200,"path":201,"stem":202,"icon":203},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":205,"icon":6,"path":206,"stem":207,"children":208},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[209,211,216,220,225],{"title":205,"path":206,"stem":207,"icon":210},"i-lucide-gauge",{"title":212,"path":213,"stem":214,"icon":215},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":217,"path":218,"stem":219,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":221,"path":222,"stem":223,"icon":224},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":226,"path":227,"stem":228,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":230,"path":231,"stem":232,"icon":233},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":235,"path":236,"stem":237,"icon":238},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"id":240,"title":55,"body":241,"description":970,"extension":971,"links":972,"meta":973,"navigation":974,"path":56,"seo":975,"stem":57,"__hash__":978},"docs\u002F2.guides\u002F05.cross-format.md",{"type":242,"value":243,"toc":958},"minimark",[244,261,276,281,305,328,336,354,360,374,378,407,411,416,439,458,535,550,554,621,631,637,669,704,708,760,783,787,827,831,919,928,932,954],[245,246,247,248,252,253,256,257,260],"p",{},"By default jscpd compares a file only with files of the same format, so a function copied from a ",[249,250,251],"code",{},".js"," file into a ",[249,254,255],{},".ts"," file and given type annotations is invisible to a plain scan. Two things change that. ",[249,258,259],{},"--cross-formats"," puts related formats into one comparison pool, with the types stripped from the TypeScript side, and files that embed other languages, Vue, Svelte and Astro components and Markdown, are split into blocks that each join the pool of their own language. You reach for the first during a migration from JavaScript to TypeScript or in a repository that keeps both; the second needs no flag.",[262,263,264,266,267,271,272,275],"note",{},[249,265,259],{}," is available from jscpd ",[268,269,270],"strong",{},"5.0.14",". Embedded blocks have been scanned under their own formats since jscpd ",[268,273,274],{},"5.0.2",". Neither needs anything beyond the binary.",[277,278,280],"h2",{"id":279},"run-it","Run it",[245,282,283,292,293,296,297,300,301,304],{},[284,285,289],"a",{"href":286,"rel":287},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Ftree\u002Fmaster\u002Ffixtures\u002Fcross-formats",[288],"nofollow",[249,290,291],{},"fixtures\u002Fcross-formats"," holds ",[249,294,295],{},"a.ts",", a typed ",[249,298,299],{},"computeTotals"," under an interface, and ",[249,302,303],{},"b.js",", the same function without types. A plain scan keeps the two formats apart:",[306,307,313],"pre",{"className":308,"code":309,"filename":310,"language":311,"meta":312,"style":312},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd .\n","Terminal","bash","",[249,314,315],{"__ignoreMap":312},[316,317,320,324],"span",{"class":318,"line":319},"line",1,[316,321,323],{"class":322},"sBMFI","jscpd",[316,325,327],{"class":326},"sfazB"," .\n",[306,329,334],{"className":330,"code":332,"language":333,"meta":312},[331],"language-text","No duplicates found.\nFound 0 clones.\n","text",[249,335,332],{"__ignoreMap":312},[306,337,339],{"className":308,"code":338,"filename":310,"language":311,"meta":312,"style":312},"jscpd . --cross-formats js-ts\n",[249,340,341],{"__ignoreMap":312},[316,342,343,345,348,351],{"class":318,"line":319},[316,344,323],{"class":322},[316,346,347],{"class":326}," .",[316,349,350],{"class":326}," --cross-formats",[316,352,353],{"class":326}," js-ts\n",[306,355,358],{"className":356,"code":357,"language":333,"meta":312},[331],"Clone found (typescript)\n - a.ts [6:1 - 19:2] (14 lines, 71 tokens)\n   b.js [1:1 - 14:2]\nFound 1 clones.\n",[249,359,357],{"__ignoreMap":312},[245,361,362,365,366,369,370,373],{},[249,363,364],{},"js-ts"," is the preset for ",[249,367,368],{},"javascript,jsx,typescript,tsx","; ",[249,371,372],{},"--cross-formats \"javascript,typescript\""," names the same two formats by hand.",[277,375,377],{"id":376},"reading-the-output","Reading the output",[245,379,380,381,383,384,386,387,390,391,394,395,398,399,402,403,406],{},"The clone is reported on the original sources: lines 6 to 19 of ",[249,382,295],{},", annotations included, against lines 1 to 14 of ",[249,385,303],{},". The match itself runs on the TypeScript tokens with the type syntax removed, which is how ",[249,388,389],{},"function computeTotals(values: number[], threshold: number): Totals"," lines up with ",[249,392,393],{},"function computeTotals(values, threshold)"," and the ",[249,396,397],{},"as Totals"," at the end disappears; the interface above the function has no counterpart, so the clone starts below it. In the table a cross-format clone is attributed to one format of the group, here ",[249,400,401],{},"typescript",", while the ",[249,404,405],{},"Total"," row counts it once.",[277,408,410],{"id":409},"common-tasks","Common tasks",[412,413,415],"h3",{"id":414},"group-other-formats","Group other formats",[306,417,419],{"className":308,"code":418,"filename":310,"language":311,"meta":312,"style":312},"jscpd . --cross-formats \"javascript,typescript;css,scss\"\n",[249,420,421],{"__ignoreMap":312},[316,422,423,425,427,429,433,436],{"class":318,"line":319},[316,424,323],{"class":322},[316,426,347],{"class":326},[316,428,350],{"class":326},[316,430,432],{"class":431},"sMK4o"," \"",[316,434,435],{"class":326},"javascript,typescript;css,scss",[316,437,438],{"class":431},"\"\n",[245,440,441,442,445,446,449,450,453,454,457],{},"Formats inside a group are separated by commas and groups by semicolons. Type stripping happens only in a group that holds JavaScript and TypeScript; any other group compares the token streams as they are, so a rule written the same way in a ",[249,443,444],{},".css"," and a ",[249,447,448],{},".scss"," file matches and a nested SCSS rule does not. A group with one format is dropped with a warning, ",[249,451,452],{},"Warning: --cross-formats group 'javascript' has fewer than two formats, ignored",". In the config file the key is ",[249,455,456],{},"crossFormats",":",[306,459,464],{"className":460,"code":461,"filename":462,"language":463,"meta":312,"style":312},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"crossFormats\": [[\"javascript\", \"typescript\"], [\"css\", \"scss\"]]\n}\n",".jscpd.json","json",[249,465,466,471,529],{"__ignoreMap":312},[316,467,468],{"class":318,"line":319},[316,469,470],{"class":431},"{\n",[316,472,474,477,480,483,485,488,490,493,495,498,500,502,504,507,510,512,515,517,519,521,524,526],{"class":318,"line":473},2,[316,475,476],{"class":431},"  \"",[316,478,456],{"class":479},"spNyl",[316,481,482],{"class":431},"\"",[316,484,457],{"class":431},[316,486,487],{"class":431}," [[",[316,489,482],{"class":431},[316,491,492],{"class":326},"javascript",[316,494,482],{"class":431},[316,496,497],{"class":431},",",[316,499,432],{"class":431},[316,501,401],{"class":326},[316,503,482],{"class":431},[316,505,506],{"class":431},"],",[316,508,509],{"class":431}," [",[316,511,482],{"class":431},[316,513,514],{"class":326},"css",[316,516,482],{"class":431},[316,518,497],{"class":431},[316,520,432],{"class":431},[316,522,523],{"class":326},"scss",[316,525,482],{"class":431},[316,527,528],{"class":431},"]]\n",[316,530,532],{"class":318,"line":531},3,[316,533,534],{"class":431},"}\n",[245,536,537,538,541,542,545,546,549],{},"The key also takes the command-line string, ",[249,539,540],{},"\"crossFormats\": \"js-ts\"",", or an array of such strings, ",[249,543,544],{},"[\"javascript,typescript\", \"css,scss\"]",". A flat array of single names, ",[249,547,548],{},"[\"javascript\", \"typescript\"]",", is read as one group per name and ignored with the warning above.",[412,551,553],{"id":552},"clones-inside-components-and-markdown","Clones inside components and Markdown",[245,555,556,557,560,561,564,565,568,569,572,573,575,576,572,579,581,582,584,585,588,589,592,593,575,595,598,599,601,602,605,606,609,610,612,613,620],{},"jscpd splits a ",[249,558,559],{},".vue",", ",[249,562,563],{},".svelte"," or ",[249,566,567],{},".astro"," file into its blocks and a Markdown file into its fenced code blocks, and scans each block under the block's own language: a ",[249,570,571],{},"\u003Cscript lang=\"ts\">"," as ",[249,574,401],{},", a ",[249,577,578],{},"\u003Cstyle>",[249,580,514],{}," (or ",[249,583,523],{}," and ",[249,586,587],{},"less","), the markup as ",[249,590,591],{},"html",", the frontmatter of an Astro file as ",[249,594,401],{},[249,596,597],{},"```ts"," fence as ",[249,600,401],{},". Markdown prose is scanned as ",[249,603,604],{},"markdown"," (5.0.14+). A block takes part in the pool of its format, so a ",[249,607,608],{},"\u003Cscript>"," matches a ",[249,611,255],{}," file and a fence in a guide matches the component it documents. The report names the block's format after the file. In ",[284,614,617],{"href":615,"rel":616},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Ftree\u002Fmaster\u002Ffixtures\u002Fembedded-stats-demo",[288],[249,618,619],{},"fixtures\u002Fembedded-stats-demo",", two Vue components and two Markdown guides share 13 lines of TypeScript:",[306,622,623],{"className":308,"code":309,"filename":310,"language":311,"meta":312,"style":312},[249,624,625],{"__ignoreMap":312},[316,626,627,629],{"class":318,"line":319},[316,628,323],{"class":322},[316,630,327],{"class":326},[306,632,635],{"className":633,"code":634,"language":333,"meta":312},[331],"Clone found (typescript)\n - component\u002FExportCard.vue:typescript [35:1 - 48:2] (13 lines, 189 tokens)\n   component\u002FReportCard.vue:typescript [35:1 - 48:2]\nClone found (typescript)\n - component\u002FExportCard.vue:typescript [35:1 - 48:2] (13 lines, 189 tokens)\n   markdown\u002Fexporting.md:typescript [23:1 - 57:2]\nClone found (typescript)\n - component\u002FExportCard.vue:typescript [35:1 - 48:2] (13 lines, 189 tokens)\n   markdown\u002Freporting.md:typescript [23:1 - 57:2]\nFound 3 clones.\n",[249,636,634],{"__ignoreMap":312},[245,638,639,640,642,643,645,646,584,649,651,652,560,655,584,658,661,662,665,666,668],{},"The Markdown fragment runs from line 23 to line 57 because the shared code sits in two fences with prose between them; the console counts the 13 lines the fences duplicate, and the prose stays in the ",[249,641,604],{}," row. The ",[249,644,401],{}," row holds only the lines of the blocks, 52 over four sources, since jscpd 5.3.2; the ",[249,647,648],{},"vue",[249,650,604],{}," rows hold the rest of each file. The pattern is the same for the other formats: a Svelte component yields ",[249,653,654],{},"component1.svelte:javascript",[249,656,657],{},":css",[249,659,660],{},":html",", an Astro component ",[249,663,664],{},"component1.astro:typescript"," for the frontmatter and ",[249,667,660],{}," for the markup.",[262,670,671,672,675,676,678,679,682,683,564,685,687,688,560,691,560,693,695,696,703],{},"Since jscpd 5.0.2 each block of a Vue file is scanned under its own format and reported with it, ",[249,673,674],{},"TicketCard.vue:html"," for the template. The template block is ",[249,677,591],{},"; jscpd 4 reported it as ",[249,680,681],{},"markup",". Tooling that filtered Vue clones by the ",[249,684,681],{},[249,686,648],{}," format name needs the block formats instead. Since jscpd 5.2.0 the wrapper tags (",[249,689,690],{},"\u003Ctemplate>",[249,692,608],{},[249,694,578],{},") are not part of the html stream, so a template clone ends with the template; ",[284,697,700],{"href":698,"rel":699},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Ftree\u002Fmaster\u002Ffixtures\u002Fsfc-demo",[288],[249,701,702],{},"fixtures\u002Fsfc-demo"," shows one.",[277,705,707],{"id":706},"in-ci","In CI",[306,709,714],{"className":710,"code":711,"filename":712,"language":713,"meta":312,"style":312},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","- uses: kucherenko\u002Fjscpd@v5\n  with:\n    extra-args: --cross-formats js-ts\n    threshold: 3\n",".github\u002Fworkflows\u002Fjscpd.yml","yaml",[249,715,716,730,738,748],{"__ignoreMap":312},[316,717,718,721,725,727],{"class":318,"line":319},[316,719,720],{"class":431},"-",[316,722,724],{"class":723},"swJcz"," uses",[316,726,457],{"class":431},[316,728,729],{"class":326}," kucherenko\u002Fjscpd@v5\n",[316,731,732,735],{"class":318,"line":473},[316,733,734],{"class":723},"  with",[316,736,737],{"class":431},":\n",[316,739,740,743,745],{"class":318,"line":531},[316,741,742],{"class":723},"    extra-args",[316,744,457],{"class":431},[316,746,747],{"class":326}," --cross-formats js-ts\n",[316,749,751,754,756],{"class":318,"line":750},4,[316,752,753],{"class":723},"    threshold",[316,755,457],{"class":431},[316,757,759],{"class":758},"sbssI"," 3\n",[245,761,762,763,766,767,770,771,773,774,777,778,782],{},"The Action has no ",[249,764,765],{},"cross-formats"," input, so the flag goes through ",[249,768,769],{},"extra-args"," or through the ",[249,772,456],{}," key of a config file passed with ",[249,775,776],{},"config","; embedded blocks need nothing. A cross-format clone counts in the duplication percentage like any other, so the threshold sees it, and the ",[284,779,781],{"href":780},"\u002Fguides\u002Fci#upload-sarif-to-code-scanning","SARIF upload"," links both files in the alert.",[277,784,786],{"id":785},"limits","Limits",[788,789,790,814,821,824],"ul",{},[791,792,793,796,797,800,801,584,803,806,807,810,811,813],"li",{},[249,794,795],{},"--format"," selects files by the file's format, not by the block's. ",[249,798,799],{},"--format typescript"," leaves ",[249,802,559],{},[249,804,805],{},".md"," files out, so a TypeScript gate that should see components lists ",[249,808,809],{},"typescript,vue",", and ",[249,812,604],{}," for the guides.",[791,815,816,817,820],{},"Only type syntax is removed from the TypeScript side. Constructs that compile to code, such as an ",[249,818,819],{},"enum",", have no JavaScript twin to match.",[791,822,823],{},"Groups compare token streams, so formats whose syntax differs beyond types, SCSS nesting against flat CSS for instance, only match where the text is the same.",[791,825,826],{},"In the per-format table a cross-format clone belongs to one of the group's formats, so the rows of the others show fewer clones than the files take part in.",[277,828,830],{"id":829},"options","Options",[832,833,834,853],"table",{},[835,836,837],"thead",{},[838,839,840,844,847,850],"tr",{},[841,842,843],"th",{},"Flag",[841,845,846],{},"Config key",[841,848,849],{},"Effect",[841,851,852],{},"Default",[854,855,856,881,899],"tbody",{},[838,857,858,864,868,878],{},[859,860,861],"td",{},[249,862,863],{},"--cross-formats \u003CGROUPS>",[859,865,866],{},[249,867,456],{},[859,869,870,871,874,875,877],{},"Compare the formats of a group in one pool; ",[249,872,873],{},";"," separates groups, ",[249,876,364],{}," is the preset, TypeScript is stripped of types when grouped with JavaScript (5.0.14+)",[859,879,880],{},"none",[838,882,883,888,893,896],{},[859,884,885],{},[249,886,887],{},"--format \u003CLIST>",[859,889,890],{},[249,891,892],{},"format",[859,894,895],{},"Formats of the files to scan; the blocks of a file follow its format",[859,897,898],{},"all",[838,900,901,906,911,917],{},[859,902,903],{},[249,904,905],{},"--formats-exts \u003CMAP>",[859,907,908],{},[249,909,910],{},"formatsExts",[859,912,913,914],{},"Map extra extensions to a format, ",[249,915,916],{},"javascript:es,es6",[859,918,880],{},[245,920,921,923,924,927],{},[284,922,120],{"href":121}," has every flag with its default; the format names are on the ",[284,925,926],{"href":173},"supported formats"," page.",[277,929,931],{"id":930},"related","Related",[788,933,934,939,944,949],{},[791,935,936,938],{},[284,937,172],{"href":173}," for the names a group takes and the extensions behind them.",[791,940,941,943],{},[284,942,105],{"href":106}," for the tokenization and normalization the pool is built on.",[791,945,946,948],{},[284,947,50],{"href":51}," for a JavaScript package and a TypeScript package that share code.",[791,950,951,953],{},[284,952,100],{"href":101}," for the renamed and near-miss clones a cross-format pool can also report.",[955,956,957],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":312,"searchDepth":473,"depth":473,"links":959},[960,961,962,966,967,968,969],{"id":279,"depth":473,"text":280},{"id":376,"depth":473,"text":377},{"id":409,"depth":473,"text":410,"children":963},[964,965],{"id":414,"depth":531,"text":415},{"id":552,"depth":531,"text":553},{"id":706,"depth":473,"text":707},{"id":785,"depth":473,"text":786},{"id":829,"depth":473,"text":830},{"id":930,"depth":473,"text":931},"Find clones between JavaScript and TypeScript files with --cross-formats, and inside Vue, Svelte, Astro and Markdown files, whose blocks are scanned under their own formats.","md",null,{},{"icon":58},{"title":976,"description":977},"Cross-format clone detection with jscpd","jscpd compares each format with itself by default; --cross-formats groups related formats into one pool, and single-file components and Markdown are split into blocks scanned as their own languages.","EHXxfj4g_yo05zwvB6IWFZSatzi3slXBPTTdtySQQUw",[980,982],{"title":50,"path":51,"stem":52,"description":981,"icon":53,"children":-1},"Scan a repository of many packages so the report holds the clones you can act on, with --skip-local and --skip-isolated to drop the pairs you accept.",{"title":60,"path":61,"stem":62,"description":983,"icon":63,"children":-1},"Give Claude, Cursor, Copilot and other coding agents jscpd through the MCP server, five installable skills and the ai reporter.",1791302986626]