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

colipar

v1.0.1

Published

Simplifies capturing and parsing user input from the command line.

Downloads

4

Readme

Colipar

npm version License: MIT

Colipar is a lightweight and flexible tool for capturing and parsing user input from the command line.

Features

  • Lightweight: Colipar is lightweight and has a small footprint, making it easy to integrate into your project.
  • Flexible: Colipar allows you to capture and parse user input from the command line in a flexible and customizable way.
  • TypeScript Support: Colipar is written in TypeScript, making it easy to use with TypeScript projects.

Installation

npm install colipar
pnpm add colipar
yarn add colipar
bun add colipar

Usage

const input = colipar({
  flags: {
    msg: { type: "string", short: "m" },
    version: { type: "boolean", short: "v" }
  }
})

// Your code here
my-command --msg "Hello world" # output: { msg: "Hello world", version: false }
my-command -m "Hello world" # output: { msg: "Hello world", version: false }
my-command -v # output: { msg: undefined, version: true }
my-command # output: { msg: undefined, version: false }

API Reference

colipar(options)

Captures and parses user input from the command line.

  • options (object): The options for capturing and parsing user input.
    • flags (object): The flags to capture and parse.
      • [key] (string): The name of the flag.
        • type (string): The type of the flag. Can be either "string" or "boolean".
        • short (string): The short version of the flag.

Example:

const input = colipar({
  flags: {
    msg: { type: "string", short: "m" },
    version: { type: "boolean", short: "v" }
  }
})

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request. Here are some ways you can contribute:

  • Bug Reports: If you find any bugs or unexpected behavior, please open an issue describing the problem.
  • Feature Requests: If you have ideas for new features or improvements, feel free to suggest them by opening an issue.
  • Code Contributions: Contributions to the codebase via pull requests are highly appreciated. Before submitting a pull request, please make sure to follow the contribution guidelines below.

Contribution Guidelines

  1. Fork the repository and clone it to your local machine.
  2. Create a new branch for your feature/fix: git checkout -b feature-name.
  3. Make changes and test them thoroughly.
  4. Ensure that your code follows the existing code style and conventions.
  5. Update the README and documentation if necessary.
  6. Commit your changes with descriptive commit messages.
  7. Push your branch to your fork: git push origin feature-name.
  8. Open a pull request to the main branch of the original repository.

Thank you for contributing to colipar!

License

This project is licensed under the MIT License - see the LICENSE file for details.