Server IP : 108.163.255.210 / Your IP : 18.119.118.237 Web Server : Apache System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 User : ( 1172) PHP Version : 7.2.34 Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/unilinki/public_html/unilinkindia.com/old/node_modules/minimist/ |
Upload File : |
# minimist parse argument options This module is the guts of optimist's argument parser without all the fanciful decoration. [![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) [![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) # example ``` js var argv = require('minimist')(process.argv.slice(2)); console.dir(argv); ``` ``` $ node example/parse.js -a beep -b boop { _: [], a: 'beep', b: 'boop' } ``` ``` $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz { _: [ 'foo', 'bar', 'baz' ], x: 3, y: 4, n: 5, a: true, b: true, c: true, beep: 'boop' } ``` # methods ``` js var parseArgs = require('minimist') ``` ## var argv = parseArgs(args, opts={}) Return an argument object `argv` populated with the array arguments from `args`. `argv._` contains all the arguments that didn't have an option associated with them. Numeric-looking arguments will be returned as numbers unless `opts.string` or `opts.boolean` is set for that argument name. Any arguments after `'--'` will not be parsed and will end up in `argv._`. options can be: * `opts.string` - a string or array of strings argument names to always treat as strings * `opts.boolean` - a boolean, string or array of strings to always treat as booleans. if `true` will treat all double hyphenated arguments without equal signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `opts.alias` - an object mapping string names to strings or arrays of string argument names to use as aliases * `opts.default` - an object mapping string argument names to default values * `opts.stopEarly` - when true, populate `argv._` with everything after the first non-option * `opts['--']` - when true, populate `argv._` with everything before the `--` and `argv['--']` with everything after the `--`. Here's an example: * `opts.unknown` - a function which is invoked with a command line parameter not defined in the `opts` configuration object. If the function returns `false`, the unknown option is not added to `argv`. ``` > require('./')('one two three -- four five --six'.split(' '), { '--': true }) { _: [ 'one', 'two', 'three' ], '--': [ 'four', 'five', '--six' ] } ``` Note that with `opts['--']` set, parsing for arguments still stops after the `--`. # install With [npm](https://npmjs.org) do: ``` npm install minimist ``` # license MIT