New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

copy-paste-detector-js

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-paste-detector-js

Detect duplicated functions and variables in JavaScript files.

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Copy Paste Detector

This npm package analyzes JavaScript files to detect duplicated functions and variables, generating a report in JSON format.

Installation

To use this package, install it globally or locally in your project:

npm install copy-paste-detector-js

Usage You can run the package via npm script with optional parameters:

and edit add that script line to your package.json

 "scripts": {
    "copy-paste-detector-js": "node node_modules/copy-paste-detector-js/index.js scripts2"
  },

scripts2 is folder name (optional)

Example

npm run copy-paste-detector-js

This will analyze JavaScript files in my-scripts-folder and generate a copy-paste-detector-results.json file in the current directory.

Output

The package outputs a JSON file (copy-paste-detector-results.json) containing details of duplicated functions and variables found in the analyzed JavaScript files.

Output Example ( copy-paste-detector-results.json )

[
  {
    "name": "tester",
    "count": 2,
    "type": "function",
    "occurrences": [
      {
        "line": 757,
        "filePath": "C:\\Users\\cengiz.ilhan\\Desktop\\spagetti detector\\scripts\\functions.js"
      },
      {
        "line": 374,
        "filePath": "C:\\Users\\cengiz.ilhan\\Desktop\\spagetti detector\\scripts\\yazarlar-app.js"
      }
    ]
  }
]

https://github.com/cengizilhan/copy-paste-detector-js

https://github.com/cengizilhan/

Keywords

FAQs

Package last updated on 23 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc