Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/dargs/ |
Upload File : |
declare namespace dargs { interface Options { /** Keys or regex of keys to exclude. Takes precedence over `includes`. */ excludes?: ReadonlyArray<string | RegExp>; /** Keys or regex of keys to include. */ includes?: ReadonlyArray<string | RegExp>; /** Maps keys in `input` to an aliased name. Matching keys are converted to arguments with a single dash (`-`) in front of the aliased key and the value in a separate array item. Keys are still affected by `includes` and `excludes`. */ aliases?: {[key: string]: string}; /** Setting this to `false` makes it return the key and value as separate array items instead of using a `=` separator in one item. This can be useful for tools that doesn't support `--foo=bar` style flags. @default true @example ``` console.log(dargs({foo: 'bar'}, {useEquals: false})); // [ // '--foo', 'bar' // ] ``` */ useEquals?: boolean; /** Exclude `false` values. Can be useful when dealing with strict argument parsers that throw on unknown arguments like `--no-foo`. @default false */ ignoreFalse?: boolean; /** By default, camelCased keys will be hyphenated. Enabling this will bypass the conversion process. @default false @example ``` console.log(dargs({fooBar: 'baz'})); //=> ['--foo-bar', 'baz'] console.log(dargs({fooBar: 'baz'}, {allowCamelCase: true})); //=> ['--fooBar', 'baz'] ``` */ allowCamelCase?: boolean; } } /** Reverse [`minimist`](https://github.com/substack/minimist). Convert an object of options into an array of command-line arguments. @param input - Object to convert to command-line arguments. @example ``` import dargs = require('dargs'); const input = { _: ['some', 'option'], // Values in '_' will be appended to the end of the generated argument list '--': ['separated', 'option'], // Values in '--' will be put at the very end of the argument list after the escape option (`--`) foo: 'bar', hello: true, // Results in only the key being used cake: false, // Prepends `no-` before the key camelCase: 5, // CamelCase is slugged to `camel-case` multiple: ['value', 'value2'], // Converted to multiple arguments pieKind: 'cherry', sad: ':(' }; const excludes = ['sad', /.*Kind$/]; // Excludes and includes accept regular expressions const includes = ['camelCase', 'multiple', 'sad', /^pie.+/]; const aliases = {file: 'f'}; console.log(dargs(input, {excludes})); // [ // '--foo=bar', // '--hello', // '--no-cake', // '--camel-case=5', // '--multiple=value', // '--multiple=value2', // 'some', // 'option', // '--', // 'separated', // 'option' // ] console.log(dargs(input, {excludes, includes})); // [ // '--camel-case=5', // '--multiple=value', // '--multiple=value2' // ] console.log(dargs(input, {includes})); // [ // '--camel-case=5', // '--multiple=value', // '--multiple=value2', // '--pie-kind=cherry', // '--sad=:(' // ] console.log(dargs({ foo: 'bar', hello: true, file: 'baz' }, {aliases})); // [ // '--foo=bar', // '--hello', // '-f', 'baz' // ] ``` */ declare function dargs( input: { '--'?: string[]; _?: string[]; } & {[key: string]: string | boolean | number | string[]}, options?: dargs.Options ): string[]; export = dargs;