You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any reason that when I console.log(parser.parseArgs()) I get Namespace { config: 'script/config1.js' };
It wouldn't normally be a problem as when I do Object.keys(parser.parseArgs()) I get [ 'config' ] which I would expect.
But when using extend and js-extend I was getting a funky "isset": [Function], "set": [Function], "get" [Function], "unset": [Function] added to the output object.
I originally throught it was extend and js-extend doing it, but once I taken parseArgs out of the equation, it cleared up.
I am not looping through Object.keys in my own extend function to bypass this, but don't know what funkiness that your module is doing to add this strange "Namespace" to the output object.
Colin.
The text was updated successfully, but these errors were encountered:
Use Object.assign({}, namespace) to copy own arguments into plain object.
Namespace is ported straight from python, and I'm not sure whether it should just be a plain object. But isset and friends are gone in argparse 2.0 anyways, so closing this.
Is there any reason that when I
console.log(parser.parseArgs())
I getNamespace { config: 'script/config1.js' }
;It wouldn't normally be a problem as when I do
Object.keys(parser.parseArgs())
I get[ 'config' ]
which I would expect.But when using
extend
andjs-extend
I was getting a funky"isset": [Function], "set": [Function], "get" [Function], "unset": [Function]
added to the output object.I originally throught it was
extend
andjs-extend
doing it, but once I takenparseArgs
out of the equation, it cleared up.I am not looping through
Object.keys
in my own extend function to bypass this, but don't know what funkiness that your module is doing to add this strange "Namespace" to the output object.The text was updated successfully, but these errors were encountered: