Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.
This repository was archived by the owner on May 18, 2025. It is now read-only.

checkout how to get minimist -- parsing #12

@pyramation

Description

@pyramation

Explore minimist docs so we can parse arguments after -- for cases where it's a dynamic data entry, and names of tables' fields could possibly conflict with other arguments e.g.,

lql api insert --database mydb --table my_table -- --name hello --table yo

It's a bit contrived, but notice 2 table options. This will help so they don't conflict.

From minimist:

Any arguments after '--' will not be parsed and will end up in argv._.

opts['--'] - when true, populate argv._ with everything before the -- and argv['--'] with everything after the --. Here's an example:

> require('./')('one two three -- four five --six'.split(' '), { '--': true })
{ _: [ 'one', 'two', 'three' ],
  '--': [ 'four', 'five', '--six' ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions