0

I'm using yargs lib in project. Importing it like this:

import { argv } from 'yargs';

Accessing all of args as following:

console.log('!!! start work', argv);

which gives the output smth like this:

!!! start work {
  _: [
    ...list of args provided in command line...
  ]
  '$0': 'tools/update-imports/src'
}

I need to access all the stuff in '_' array, but argv._ fails complaining there's no such property.

Cannot find on docs this as well.

Still i think there should be a way to do it. But how?

1 Answers1

0

Ah, it can be accessed with bracket notation:

argv['_']