jscpd

  • Version 5.4.3
  • Published
  • 16.6 kB
  • No dependencies
  • MIT license

Install

npm i jscpd
yarn add jscpd
pnpm add jscpd

Overview

Copy/paste detector for programming source code. Finds duplicated code in 224 languages, reports as HTML/JSON/SARIF/Markdown, fails CI over a duplication threshold. Rust engine, self-contained binary.

Index

Functions

Functions

function runJscpd

runJscpd: {
(
args: readonly string[],
options: SpawnSyncOptionsWithStringEncoding
): SpawnSyncReturns<string>;
(
args: readonly string[],
options?: SpawnSyncOptionsWithBufferEncoding
): SpawnSyncReturns<Buffer>;
(args: readonly string[], options?: SpawnSyncOptions): SpawnSyncReturns<any>;
};
  • Runs this platform's jscpd binary with args, the way child_process.spawnSync runs a command, and returns its result.

    Throws an Error whose code is "JSCPD_NO_BINARY" when there is no prebuilt binary for this platform or the platform package is not installed. A binary that is missing on disk comes back in result.error (code ENOENT), as from spawnSync.

Package Files (1)

Dependencies (0)

No dependencies.

Dev Dependencies (0)

No dev dependencies.

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jscpd.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jscpd)
  • HTML
    <a href="https://www.jsdocs.io/package/jscpd"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>