Node.js Option Parser (nopt)
JSON →This library provides a robust and flexible option parsing solution for Node.js command-line interfaces. It is famously used by npm itself to handle its complex array of command-line arguments and configuration. `nopt` supports defining various option types (String, Number, Boolean, path, url, Date, Stream), shorthands for brevity, and mechanisms for handling unknown options. It maintains a consistent release cadence, with major versions frequently aligning with Node.js LTS cycles. The current stable version, `9.0.0`, requires Node `^20.17.0 || >=22.9.0`. Its key differentiators include strong type definition capabilities, automatic path resolution, and a battle-tested core proven by its integration into the npm CLI.
Traffic · last 30 days ↑67% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · VN · SA