Gathering detailed insights and metrics for string-argv
Gathering detailed insights and metrics for string-argv
Gathering detailed insights and metrics for string-argv
Gathering detailed insights and metrics for string-argv
npm install string-argv
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
58 Stars
36 Commits
10 Forks
3 Watching
1 Branches
7 Contributors
Updated on 22 Nov 2024
JavaScript (76.35%)
TypeScript (23.65%)
Cumulative downloads
Total Downloads
Last day
-8.8%
2,571,118
Compared to previous day
Last week
1.5%
14,917,267
Compared to previous week
Last month
13.3%
61,571,389
Compared to previous month
Last year
29.8%
584,840,900
Compared to previous year
2
string-argv
parses a string into an argument array to mimic process.argv
.
This is useful when testing Command Line Utilities that you want to pass arguments to and is the opposite of what the other argv utilities do.
npm install string-argv --save
1// Typescript
2import stringArgv from 'string-argv';
3
4const args = stringArgv(
5 '-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',
6 'node',
7 'testing.js'
8);
9
10console.log(args);
1// Javascript 2var { parseArgsStringToArgv } = require('string-argv'); 3 4var args = parseArgsStringToArgv( 5 '-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"', 6 'node', 7 'testing.js' 8); 9 10console.log(args); 11/** output 12[ 'node', 13 'testing.js', 14 '-testing', 15 'test', 16 '-valid=true', 17 '--quotes', 18 'test quotes', 19 'nested \'quotes\'', 20 '--key="some value"', 21 '--title="Peter\'s Friends"' ] 22 **/
required: arguments String: arguments that you would normally pass to the command line.
optional: environment String: Adds to the environment position in the argv array. If ommitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.
optional: file String: file that called the arguments. If omitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 3/22 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More