npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

data-clumps

v0.1.94

Published

This is a package to identify data-clumps

Downloads

1,135

Readme

Important Notice: Project Partially Discontinued

Attention Users: This project, Cerberus Data Clumps Detection and Refactoring (CDCD-R), will be partially discontinued due to significant performance improvements in our new project: PMD Data Clumps.

Why the Change?

While CDCD-R served as a valuable proof of concept for analyzing Java files with Antlr4 within the web, our new project with PMD offers a more robust and efficient solution. The new project has shown speed increases of up to 98% in parsing files, making it a superior choice for your data clump detection and refactoring needs.

What Does This Mean for Current Users?

  • Existing features and functionalities in CDCD-R will remain available, but future updates and enhancements will be limited.
  • We strongly recommend transitioning to PMD Data Clumps for improved performance and continued support.

For more details, please visit the PMD Data Clumps GitHub Repository.

About

A library to parse files and folders to check for data clumps and refactor them.

Dataset

We're excited to share our public Data-Clumps Dataset with you. We invite you to explore it and consider contributing to our growing repository. By uploading your analyzed data, you can help enrich our dataset and support the broader community in their software analysis endeavors. Together, we can enhance our understanding of data-clumps and their impact on software development.

Demo

https://fireboltcasters.github.io/data-clumps/

Reporting Format

In our endeavor to ensure precision and standardization in reporting data clumps, we utilize the following specification: Data-Clumps-Type-Context.

Visualizer

Our tool offers a unique visualizer tool to make the analysis and refactoring of data clumps more intuitive and accessible. Our data clumps visualizer provides a comprehensive overview of your code's data clumps, allowing you to easily pinpoint areas for improvement.

You can access our visualizer here: Data Clumps Visualizer

Installation & Usage

You can either choose to run it via command-line (cli) or inside your project via imports.

Via CLI

You can simply call the detection via command line.

npx data-clumps <PATH_TO_PROJECT>

Inside your Project

npm install data-clumps

Have a look at the development example in development.ts

import {SoftwareProject} from "data-clumps";

async function main(){
  console.log("1. Create empty project");
  let project: SoftwareProject = new SoftwareProject(["java"]);
  console.log("2. Add files to project");
  // for all files from your project
  let virtualPathToFile = "/myExampleProject/src/HelloWorld.java";
    let fileContent = "public class HelloWorld{ ... }";
    project.addFileContent(virtualPathToFile, fileContent);
  
  console.log("3. Let the file be parsed");
  await project.parseSoftwareProject();
  
  console.log(4. Detect Data-Clumps");
  let dataClumpsContext = await project.detectDataClumps()
  
  console.log("5. Detected Data-Clumps");
  console.log(dataClumpsContext);
}

main();

Roadmap

  • [x] Integrate website-to-gif: https://github.com/PabloLec/website-to-gif
  • [x] Visualization extracted to: A library to visualize data clumps which is used in data-clumps-visualizer.
  • [x] Support cli
    • [ ] Improve options and add documentation
  • [ ] Parser
    • [ ] Support Java
      • [X] Integrated Antlr4
      • [X] Converting of JavaCST to JavaAST
      • [X] Creating Data Clumps AST
      • [X] Find minimum of LCSD found files
      • [X] Investigate why more files than LCSD have been found
      • [ ] Support anonymous classes
      • [ ] Support Generics
      • [ ] Implement Java Refactor Interface
    • [ ] Support TypeScript
    • [ ] Support JavaScript
    • [ ] Support Python
    • [ ] Support C#
    • [ ] Support C++
  • [ ] Refactoring
    • [ ] Support Java

Roadmap - Future improvements

  • [ ] Extract file parsing to PMD for speed increase: https://github.com/FireboltCasters/pmd-data-clumps
    • Using PMD will then not support web-based parsing

License

All Rights Reserved.

Copyright (c) 2023 Nils Baumgartner

No part of this software may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the copyright holder, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law.

For permission requests, please contact the copyright holder at [email protected]

Contributors

The FireboltCasters