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 🙏

© 2026 – Pkg Stats / Ryan Hefner

cla-complete

v1.0.0

Published

Node module to combine command-line-args and command-line-usage and auto-add a help parameter

Readme

cla-complete

Library to combine the fantastic command-line-args and command-line-usage modules for ease of use and to auto-add a help parameter.

Usage

Example

import {cla} from 'cla-complete';

const argDefs = [
    {
        name: 'delimiter',
        alias: 'd',
        type: String,
        description: "Delimiter with which to split the filenames on.",
        required: true
    },
    {
        name: 'number',
        alias: 'n',
        type: Number,
        defaultValue: 1,
        description: "Occurrence number of delimiter to do the splitting (defaults to 1)"
    },
    {
        name: 'src',
        alias: 's',
        type: String,
        typeLabel: '[underline]{directory}',
        defaultOption: true,
        description: "Source directory of files.",
        required: true
    },
    {
        name: 'output',
        alias: 'o',
        type: String,
        typeLabel: '[underline]{directory}',
        description: "Output directory. Default is the src directory (i.e. folders will be made in place)"
    },
    {
        name: 'move',
        alias: 'm',
        type: Boolean,
        description: "Move files instead of copying them. Copy is the default."
    },
    {
        name: 'verbose',
        alias: 'v',
        type: Boolean,
    },
    {
        name: 'dryrun',
        type: Boolean
    },
    {
        name: 'force',
        alias: 'f',
        type: Boolean
    }
];

const options = cla(argDefs,
                    'Make Named Folders',
                    'Takes a set of filenames and splits them on a delimiter and makes folders out of the first part and moves the files into the new folder.');

Options are read in the same manner as command-line-args e.g. to read the -f param just do the following.

options.force

If you call the file with the --help parameter you get the following thanks to command-line-usage.

Make Named Folders

  Takes a set of filenames and splits them on a delimiter and makes folders out
  of the first part and moves the files into the new folder.

Options

  -d, --delimiter string   Delimiter with which to split the filename on.
  -n, --number number      Occurrence number of delimiter to do the splitting (defaults to 1)
  -s, --src directory      Source directory of files.
  -o, --output directory   Output directory. Default is the src directory (i.e. folders will be made in
                           place)
  -m, --move               Move files instead of copying them. Copy is the default.
  -v, --verbose
  --dryrun
  -f, --force
  -h, --help