Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Trailing and leading quote characters are removed #201

@mefcorvi

Description

@mefcorvi

Version 13.1.1

Description

Trailing and leading quote characters are removed from the values. If I want to pass a 'string' as a value I need to triple-quote it as "''string''" or \'''string\''' when I'm specifying that in the shell.

Expected

> require('yargs-parser')([ '--arg', '"option"' ])
{ _: [], arg: '"option"' }

Actual

> require('yargs-parser')([ '--arg', '"option"' ])
{ _: [], arg: 'option' }

This probably relates to #138, #180. Definitely relates to #145 and #153.
I would suggest introducing a new keepQuotes/trimQuotes option to support the all edge cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions