Skip to content

Commit c75e8f2

Browse files
committed
feat: add formatKey and convertValue to argv2Object
1 parent 2915389 commit c75e8f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/argv2Object.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ const argv2Object = (unixmode = false) => {
8282

8383
const entries = [...argumentsv].map(argumentv => {
8484
const [k, v] = argumentv.split('=');
85-
const key = k.replace(/^-{1,2}/, '').replace(/-/g, '_');
86-
const value = v === undefined ? true : v;
85+
const key = formatKey(k, 'snakecase');
86+
const value = convertValue(v);
8787
return [key, value];
8888
});
8989

0 commit comments

Comments
 (0)