Skip to content

options parse,  #97

@mromanuk

Description

@mromanuk

Is there a way to tell if the parsed options, were default or set by the user?

const options = cli.parse({
	name:     [ 'n', 'instance name', 'string', 'Alice'],
}, [commands...]);

For example I need to know if --name Alice and my options object become:

{customer: 'Alice'}

I would like to know if it was set in the cli or it is a default option.

Something like this::

{{customer: 'Alice', setByDefault: true}, {otherOption: ..., setByDefault: false}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions