Skip to content

null prototype for returned values? #108

Description

@shadowspawn

(I want a separate issue from #106, which is otherwise transparent improvements that do not affect the user experience.)

There are two potential benefits to using a null-prototype for values:

  • can use otherwise problematic option names like toString. (Although the usual convention for CLI is kebab-case like to-string which bypasses the issue.)
  • somewhat safer use in our code

The potential downside is confusing authors. Examples:

Related discussions:

(Paraphrased from one of discussions.) For comparison, by default Commander uses plain {} for storing the option values. I did also consider Map and null prototype at the time: tj/commander.js#1102 (comment))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions