Created
December 27, 2023 12:25
-
-
Save crashmax-dev/b0ae53b3268c1d077bbc3c17257bba9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parseArgs } from "node:util"; | |
const args = parseArgs({ | |
options: { | |
name: { | |
type: "string", | |
short: "n", | |
}, | |
verbose: { | |
type: "boolean", | |
short: "v", | |
}, | |
}, | |
}); | |
console.log(args); | |
// > { | |
// > values: { name: 'Budgie', verbose: true }, | |
// > positionals: [] | |
// > } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment