File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525// ━━ IMPORT MODULES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2626// » IMPORT LOCAL MODULES
2727import { COMMAND_LINE_PATTERNS , ERROR_MESSAGES } from '#constants' ;
28- import { formatKey , convertValue } from '#functions' ;
28+ import { createObjectFromArguments } from '#functions' ;
2929
3030// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3131/**
@@ -82,14 +82,7 @@ const argv2Object = (unixmode = false) => {
8282 throw new Error ( message ) ;
8383 }
8484
85- const entries = [ ...argumentsv ] . map ( argumentv => {
86- const [ k , v ] = argumentv . split ( '=' ) ;
87- const key = formatKey ( k , 'snakecase' ) ;
88- const value = convertValue ( v ) ;
89- return [ key , value ] ;
90- } ) ;
91-
92- return Object . fromEntries ( entries ) ;
85+ return createObjectFromArguments ( argumentsv , 'snakecase' ) ;
9386} ;
9487
9588// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You can’t perform that action at this time.
0 commit comments