- Joined
- Oct 31, 2022
- Messages
- 1
- Reaction score
- 0
Hello everybody,
I am doing a Node JS project and need to use the argparse module to parse arguments. I call for the parser like this :
Problem is, when my parser encounter an unknown argument it exits the function and shows me the help message. I would like to know how to fix it. I have read that this was a common error in Python which was fixed using :
But how can I fix it in node JS ?
Thank you for your help !
I am doing a Node JS project and need to use the argparse module to parse arguments. I call for the parser like this :
JavaScript:
var parser = new ArgumentParser()
parser.add_argument(<argument>)
var args = parser.parse_known_args()
console.log(args)
Python:
args, uknownargs = parser.parse_known_args()
But how can I fix it in node JS ?
Thank you for your help !