0.0.10 • Published 3 years ago

pasamanos v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Pasamanos:

A CLI parameter parser that makes 0 decisions about how you structure your project.

Usage

First, obviously, npm install pasamanos.

In your code:

import { params } from 'pasamanos'

const fromCLI = params(process.argv, {
    'verbose':'v',
    'force':'f'
});

// or maybe take key=value pairs from somewhere else? I won't judge you.
const fromSomewhereElse = params(['-f=false','-v','--very-long-flag'], {
    'verbose':'v',
    'force':'f'
});

if(fromCli.verbose){
    // say something
}

or

const { params } = require('pasamanos');

Troubleshooting

Turns out using `microbundle` to ensure compatibility between ESM and CommonJS and such
uncovered a whole rat king worth of flags and version compatibility issues. 
Sorry about that.
If you encounter this error, your best choice is requiring `pasamanos/dist/index.cjs`
instead of the default `pasamanos`. 
I mean it's below 0.1 yet but you do you.
0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago