
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A tool for building easy argv parsing in app, coupled with a "--help" me generator
A flexible, zero-dependency TypeScript class for parsing command-line arguments with support for multi-value flags, default values, required arguments, and rich help output.
ArgSpec
This is a self-contained utility. Just include ArgvParser.ts
and ArgSpec.ts
in your project.
Or install from npm:
npm install parsemate
import { ArgvParser } from "parsemate"; ( () => { const appName = "test.js"; const parser = new ArgvParser( appName , { folder: { flags: ['-f', '--folder'], description: 'Folder to scan', required: true, multiple: true, }, tech: { flags: ['-t', '--tech'], description: 'Technologies to process', multiple: true, default: ['html', 'css'], }, output: { flags: ['-o', '--output'], description: 'Output folder', default: 'dist', }, });
for (const [key, value] of parser.entries) { console.log(`${key}:`, value); }
})();
export type ArgSpec = {
flags: string[]; // e.g., ['-f', '--folder']
description: string;
required?: boolean;
multiple?: boolean;
default?: any;
};
constructor(appName: String, defs: ArgDefinition)
โ Initialize with a map of argument specs.getArg(name: string)
โ Get the parsed value for a specific argument.getAll()
โ Get all parsed arguments as an object.keys
โ Array of all argument names.values
โ Array of all parsed values.entries
โ Array of [key, value]
pairs.definitionList
โ Array of defined arguments and specs.generateHelp(appName?: string)
โ Returns CLI help string.MIT โ Use freely in personal or commercial projects.
FAQs
A tool for building easy argv parsing in app, coupled with a "--help" me generator
The npm package parsemate receives a total of 19 weekly downloads. As such, parsemate popularity was classified as not popular.
We found that parsemate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.