Skip to content

"TypeError: next.match is not a function" with "number" values #166

Closed
@juergba

Description

@juergba
const parse = require('yargs-parser');

args = parse( ['--p', 2] );

Results in:

TypeError: next.match is not a function
    at parse (D:\yargs-parser\node_modules\yargs-parser\index.js:193:42)
    at Parser (D:\yargs-parser\node_modules\yargs-parser\index.js:901:16)

The opposite - converting number into string works fine:

args = parse( ['--p', '2'] );         // { _: [], p: 2 }

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