Comments (2)
I like the idea in general and I've had the same problem previously too, but not entirely sold on this exact implementation. Why not just let the user specify an option as both string
and boolean
in the minimist options and handle it accordingly? Or maybe introduce a new type in the minimist options called any
(I prefer it over booleanish
):
const cli = meow('help', {
any: ['debug']
});
parse
seems more general and could be added independently of this change, as it could be useful for the string
type too.
false: What gets returned if no flag appears (or --no-debug is used).
No flag and --no-debug
are different. No flag returns undefined
while --no-debug
returns false
. This distinction is usually not important, but can be.
from meow.
Why not just let the user specify an option as both string and boolean in the minimist options and handle it accordingly?
Is this supported?
from meow.
Related Issues (20)
- Use Node.js builtin HOT 4
- What is the test coverage? HOT 5
- `allowUnknownFlags: false` prevents aliases for `help` and `version`. HOT 3
- Remove `trim-newlines` dependency HOT 4
- ExperimentalWarning when using Meow with modules HOT 4
- Is it possible to make input required? HOT 3
- Improve importMeta message -`meow - The 'importMeta' option is required. Its value must be 'import.meta' at meow` HOT 7
- Expose package.json version as property HOT 4
- Allow single line help messages HOT 11
- Refactor HOT 6
- Question: huge bundle size? HOT 2
- Choices? HOT 2
- flag.default values validation is faulty
- Feature Proposal - Disable Indent HOT 12
- `meow(...).flags` is `any` in 12.1.0 HOT 1
- Add "types" field in package.json HOT 2
- typescript definitions stopped working HOT 2
- String value converted to Num HOT 2
- Remove hard-rejection
- ESLint `import/no-unresolved` false positive when module is imported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meow.