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

cat-scan

v1.0.3

Published

Digs through your code base for notes you placed. Helps sort and categorize your notes by tag.

Downloads

3

Readme

cat-scan

Install

npm install -g cat-scan

Use

Have you ever had to run through and figure out a code base for a new project or a new job? Or even worse a legacy project.

cat-scan helps make notes and tagged groups of notes for dissecting code bases to provide clarity. It can be used to dig out bugs by tracing their origin files with human readable notes that are grouped by tag and stuff like that.

To make a cat-scan note in your code base, add a comment line, in whatever language, with the word "CATSCAN" in the comment. Optionally, the next word will be the tag for the note. Notes are grouped by tag in the cat-scan output. There is a special default group of 'general' for cat-scan notes without a designated tag. Anything after the tag will be the text for the cat-scan note.

There are options as well for helping skip files like images and files like package-lock.json which are too big and not ascii. The default maxSize is 50k. You shouldn't have code files larger than that, but I'm not your dad. So, the maxSize adjustable.

Some cat-scan notes may be as follows:

  • // CATSCAN JIRA-1342 This is around where the bug is
  • // CATSCAN JIRA-1342 The bug could be here too
  • // CATSCAN DEBUG Something is broke here, thanks Greg

Run cat-scan in any directory and check it out. Tell your friends, but don't stay up too late. Tomorrow is another day.

Examples

Has no notes without tags + has 1 note with tag "debug"

Has 1 notes without a tag + has 1 note with tag "debug" + maxSize of 75k + show skipped

Has 2 notes with tags exploring a specific ticket number "JIRA-1342"

CLI Options

  • --dir - allows you to select a starting directory to scan. It will scan this directory recursively. (defaults to ".")
  • --maxSize - allows you to control the size, in k, of the files to skip during your cat-scan. This is important because the scanning is faster when large files like images and package.locks are not included. So, cat-scan defaults to skipping files larger than 50k. It's meant to focus on your code files. Hopefully you don't have any larger than 50k. But if you do, you can adjust the maxSize to skip the right files for your project. (defaults to 50)
  • --skipped - Will include a special tag section in the output that listing the skipped files and their file sizes relative to the selected maxSize (defaults to false)
  • --all - will add the file sizes to all the files listed in the output. This will help you figure out why some of your files are being skipped or what your file sizes are to set the maxSize option appropriately for the output you want. (defaults to false)

| Option | Effect | Default | | :-------------------- | :--------------------------------------------------------- | :-----: | | -d, --dir <char> | Dir to cat scan | "." | | -m, --maxSize <char> | Sets the max file size ot scan | 50 | | -s, --skipped | Includes a section in the output listing the skipped files | false | | -a, --all | Include file size in all outputs | false | | -v, --version | Shows cat-scan version number | | | -h, --help | Shows an options list | |

Config file

You can add a config file named .cat-scan-config.json into your home dir and define a couple of useful things.

| Key | Effect | | :------ | :------------------------------------------------------------------------------------------ | | skip | An array of string file/dir names to be skipped by cat-scan | | maxSize | A new global default maxSize. Command line --maxSize will override the value in this config |

The Code

Don't read the code. It was written in one night and it sucks alright.