flags: Skip parsing numeric-looking argument with no option
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When parsing numeric-looking arguments which is not a flag, they are parsed as number. There are cases which it is not desired to do so. For example:
```ts
// $ deno run example.ts 000000 '000000'
import { parse } from "https://deno.land/std@0.144.0/flags/mod.ts";
console.dir(parse(Deno.args));
// output: { _: [ 0, 0 ] }
```
**Describe the solution you'd like**
There is `string` option to indicate argument names to be treated as string instead, but since the above argument is not a flag, it can't be specified with `string` option. It would be nice to have another option to indicate such argument.
**Describe alternatives you've considered**
Setting `-` as `string` works, but it skips number parsing all arguments in `-`. I can't think of another way.
Contributor guide
Assessment
This issue has not been assessed yet.