No single flag support?
See original GitHub issueI see there’s alias support, but this behavior below is kind of unexpected. Would love to know what others think here. Shouldn’t minimist
and dargs
be inter-operable?
console.log(process.argv.slice(2))
console.log(minimist(process.argv.slice(2)))
console.log(dargs(minimist(process.argv.slice(2))))
console.log(minimist(dargs(minimist(process.argv.slice(2)))))
[ 'list', '--animal', 'meow', '-A', '-L', '-P', '-H', '-A' ]
{ _: [ 'list' ],
animal: 'meow',
A: true,
L: true,
P: true,
H: true }
[ '--animal=meow', '---a', '---l', '---p', '---h', 'list' ]
{ _: [],
animal: 'meow',
'-a': true,
'-l': true,
'-p': true,
'-h': 'list' }
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
no one fights alone flag - Amazon.com
No One Fights Alone Flag 3x5 ft American Flag Garden Flags Thin Line Flag For Supporting Nurse Police Military Firefighters Home Room Garden...
Read more >Single Family Housing Programs - USDA Rural Development
Purchase or build with no money down in eligible rural areas · Low or Very-Low Income · Typically 33-year term with payment assistance...
Read more >Find your lost AirPods - Apple Support
There is no other Apple service that can find, track, or otherwise flag your device for you. To find your AirPods, you need...
Read more >American Flag Display FAQ | The American Legion
Can a flag that has covered a casket be displayed after its original use? There are no provisions in the Flag Code to...
Read more >Flag code FAQs: Displaying the flag - USHistory.org
In military use, no more than two flags may be on a single pole. ... the Flag Code does not support those who...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @sindresorhus, thanks for the quick reply.
I’m proxying some bash commands and I need to parse using
minimist
and then pass the parent commands along to a child process again.There are a couple of other options I found that follow
minimist
. Feel free to close.@sindresorhus, probably behind some option e.g.
allowSingleFlags
? Otherwise it sounds like a breaking change. Because most of the tests are failing. Which is normal - e.g.{ a: 123 }
now becomes['-a=123']
.