-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Is there a way to have optional flag values? Something like the following:
const arg = require('arg');
const args = arg({
'--port': Number, // --port <number>
'--host': String.optional, // --host [string]
});Given --port 5432 --host localhost it should return { _: [], port: 5432, host: 'localhost' },
given --port 5432 --host it should return something like { _: [], port: 5432, host: true },
and given --port 5432 it should return { _: [], port: 5432 },
markdalgleish and tobiaswild
Metadata
Metadata
Assignees
Labels
No labels