Skip to content

Glossary: Node.js Basics

parseArgs

A function from `node:util` that sorts command-line words into options (`values`) and other words (`positionals`). An unknown option throws an error with an `ERR_PARSE_ARGS_` code.

Where the book teaches it

Related terms

Flag (option)Positional argumentUsage error