Skip to content

Object default values display JSON under help menu #1283

@carsonreinke

Description

@carsonreinke

Using an any object as the default value displays a JSON version of that object. This might not be very user friendly.

Here is an example using IPv4 from ip-num package:

(default: {"bitSize":32,"maximumBitSize":"4294967295","type":1,"octets":[{"value":1},{"value":1},{"value":1},{"value":1}],"separator":".","value":"16843009"})

Consider changing JSON.stringify at https://github.com/tj/commander.js/blob/master/index.js#L1413 to a scheme utilizing .toString instead. The impact could be pretty severe though.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions