Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example using new experimental Node.js parseArgs method (https://nodejs.org/api/util.html#utilparseargsconfig) - more new features covered at https://github.com/simonplend/whats-new-in-node-js-core
import { parseArgs } from "node:util";
const args = parseArgs({
options: {
name: {
type: "string",
},
verbose: {
type: "boolean",
short: "v",
},
},
allowPositionals: true,
});
console.log(args);
@DominusKelvin
Copy link

DominusKelvin commented Jun 2, 2022

Nice

@mikeerickson
Copy link

mikeerickson commented Jun 2, 2022

Can't believe it has taken this long! Curious how long this will be an experimental flag

@ebukahills
Copy link

ebukahills commented Jun 3, 2022

Cool stuff!

@zanniboni
Copy link

zanniboni commented Jun 3, 2022

Nice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment