optionator
npmv0.9.4option parsing and help generation
Adopt with care
optionator is usable, with caveats. Last published 866 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- DMaintenance: grade D, Poor — a real concern.
Last published 866 days ago.
- BWeight: grade B, Good.
Pulls in 7 transitive packages, about 178 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding optionator to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing optionator, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 0.8.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the optionator README.
var optionator = require('optionator')({
prepend: 'Usage: cmd [options]',
append: 'Version 1.0.0',
options: [{
option: 'help',
alias: 'h',
type: 'Boolean',
description: 'displays help'
}, {
option: 'count',
alias: 'c',
type: 'Int',
description: 'number of things',
example: 'cmd --count 2'optionator vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| optionatorthis page | 0 | 2 | MIT | 2 years ago |
| meow | 36.7M | 1 | MIT | 1 day ago |
| getopts | 4.2M | 1 | MIT | 1 day ago |
| commander | 451.1M | 11 | MIT | 1 day ago |
| cliui | 212.4M | 1 | ISC | 1 day ago |
| yargs-parser | 178.8M | 2 | ISC | 1 day ago |
Dependencies
Declared by optionator v0.9.4. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (6)
Dev (2)
Used by
Popular packages that depend on optionator.
Relationship graph
Dependencies (left) and dependents (right) of optionator.
Frequently installed together
Runtime typescript and ESM support for Node.js
ECMAScript parsing infrastructure for multipurpose analysis
utility box for ECMAScript language tools
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
The semantic version parser used by npm.
Constants and utilities about visitor keys to traverse AST.
Escape RegExp special characters
TypeScript definitions for estree
An AST-based pattern checker for JavaScript.
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run
Prettier is an opinionated code formatter
Release history
No releases in the last two years, typically about 46 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.9.4latest | 2 years ago | 49 KB | MIT |
| 0.9.3 | 3 years ago | 49 KB | MIT |
| 0.9.2 | 3 years ago | 49 KB | MIT |
| 0.9.1 | 6 years ago | 49 KB | MIT |
| 0.9.0 | 6 years ago | 49 KB | MIT |
| 0.8.3 | 6 years ago | 49 KB | MIT |
| 0.8.2 | 10 years ago | — | MIT |
| 0.8.1 | 10 years ago | — | MIT |
| 0.8.0 | 10 years ago | — | MIT |
| 0.7.1 | 10 years ago | — | MIT |
| 0.7.0 | 10 years ago | — | MIT |
| 0.6.0 | 11 years ago | — | MIT |
| 0.5.0 | 11 years ago | — | MIT |
| 0.4.0 | 12 years ago | — | MIT |
| 0.3.0 | 12 years ago | — | MIT |
Overview
optionator is an npm package that option parsing and help generation. It has 2 known dependents in the graph. The latest version is 0.9.4, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need option parsing and help generation and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Keywords
Frequently asked questions
Should I use optionator?
optionator is usable, with caveats. Last published 866 days ago.
How do I install optionator?
Run `npm install optionator` to add optionator to your npm project.
How many dependencies does optionator have?
optionator declares 8 direct dependencies and pulls in 7 packages in total once its runtime tree is resolved totalling about 178 KB on disk.
What license is optionator released under?
optionator is distributed under the MIT license.
How popular is optionator?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on optionator.
Is optionator still maintained?
The most recent release of optionator (v0.9.4) was published 2 years ago.
Does optionator run install scripts?
No. optionator does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.