</>PackageGraphPackageGraph

optionator

npmv0.9.4

option 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.

6
Direct dependencies

Runtime packages this one declares itself.

7
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

178 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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'
Example truncated — see the full README.

optionator vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
optionatorthis page02MIT2 years ago
meow36.7M1MIT1 day ago
getopts4.2M1MIT1 day ago
commander451.1M11MIT1 day ago
cliui212.4M1ISC1 day ago
yargs-parser178.8M2ISC1 day ago

Dependencies

Declared by optionator v0.9.4. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (2)

livescript ^1.6.0mocha ^10.4.0

Used by

Popular packages that depend on optionator.

Relationship graph

Dependencies (left) and dependents (right) of optionator.

Frequently installed together

jitinpm

Runtime typescript and ESM support for Node.js

0/wk15 dependentsMITTS
esprimanpm

ECMAScript parsing infrastructure for multipurpose analysis

77.6M/wk5 dependentsBSD-2-Clause
esutilsnpm

utility box for ECMAScript language tools

0/wk2 dependentsBSD-2-Clause
chainpm

BDD/TDD assertion library for node.js and the browser. Test framework agnostic.

0/wk57 dependentsMIT
semvernpm

The semantic version parser used by npm.

0/wk55 dependentsISC
eslint-visitor-keysnpm

Constants and utilities about visitor keys to traverse AST.

340.8M/wk4 dependentsApache-2.0TS
escape-string-regexpnpm

Escape RegExp special characters

316.5M/wk8 dependentsMIT
@types/estreenpm

TypeScript definitions for estree

152.1M/wk12 dependentsMITTS
eslintnpm

An AST-based pattern checker for JavaScript.

138.4M/wk279 dependentsMITTS
is-globnpm

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

137.4M/wk3 dependentsMIT
file-entry-cachenpm

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

134.5M/wk1 dependentsMITTS
prettiernpm

Prettier is an opinionated code formatter

114.2M/wk159 dependentsMITTS

Release history

No releases in the last two years, typically about 46 days apart.

Recent versions of optionator
VersionPublishedSizeLicense
0.9.4latest2 years ago49 KBMIT
0.9.33 years ago49 KBMIT
0.9.23 years ago49 KBMIT
0.9.16 years ago49 KBMIT
0.9.06 years ago49 KBMIT
0.8.36 years ago49 KBMIT
0.8.210 years agoMIT
0.8.110 years agoMIT
0.8.010 years agoMIT
0.7.110 years agoMIT
0.7.010 years agoMIT
0.6.011 years agoMIT
0.5.011 years agoMIT
0.4.012 years agoMIT
0.3.012 years agoMIT

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.