Sorry but this is "get" not "parse". Parsing is when you get command line options. When you pass script.js -xo --name=hello and you get that you used option "x" and "o" and "name" with value "hello". You can read what is Parsing on Wikipedia.
I've written NPM package for parsing command line called lily. But there is also well establish one called yargs and it's little friend yargs-parser.
I'm aware of yargs and other parsers. I said parser in this post to note what node does under the hood when it takes the values from the standard input stream; not parsing in the context you're referring to.
But this is not something that Node is doing, every single program in the system gets argument as array of strings. So this is by no means parsing by Node. If you will learn C language you will know that arguments in the system are in the form of array of strings. So No Parsing. So your "parsing" is done by the operation system.
I think you're right about the string array args. Because argv seems like a convention taken from C and C++. Java havd something similar too. If OS is doing the parsing then that's great, at least it's done somewhere under the hood haha. Thanks for your explanation. I appreciate it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry but this is "get" not "parse". Parsing is when you get command line options. When you pass
script.js -xo --name=helloand you get that you used option "x" and "o" and "name" with value "hello". You can read what is Parsing on Wikipedia.I've written NPM package for parsing command line called lily. But there is also well establish one called yargs and it's little friend yargs-parser.
I'm aware of yargs and other parsers. I said parser in this post to note what node does under the hood when it takes the values from the standard input stream; not parsing in the context you're referring to.
But this is not something that Node is doing, every single program in the system gets argument as array of strings. So this is by no means parsing by Node. If you will learn C language you will know that arguments in the system are in the form of array of strings. So No Parsing. So your "parsing" is done by the operation system.
I think you're right about the string array args. Because argv seems like a convention taken from C and C++. Java havd something similar too. If OS is doing the parsing then that's great, at least it's done somewhere under the hood haha. Thanks for your explanation. I appreciate it.