How to use the clap.Error function in clap

To help you get started, we’ve selected a few clap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github csstree / validator / lib / cli.js View on Github external
.option('-r, --reporter <name>', 'Format of output: console (default), checkstyle, json, gnu', function(name) {
        if (!reporters.hasOwnProperty(name)) {
            throw new cli.Error('Wrong value for reporter: ' + name);
        }
        return name;
    })
    .action(function(args) {

clap

Command line argument parser

MIT
Latest version published 10 months ago

Package Health Score

66 / 100
Full package analysis

Popular clap functions