Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
A minimum-viable arguments parser in ~90 LOC with zero dependencies
--
--version
or -v
--help
or -h
$ npm install --save clinical
#!/usr/bin/env node
import clinical from 'clinical'
try {
const result = clinical('1.0.0', 'my help message')
console.log(result)
} catch (error) {
console.error(error.message)
process.exit(1)
}
$ my-cli --foo --bar 42 -x=y -- baz null
{
options: { foo: true, bar: 42, x: 'y' },
positionals: [ 'baz', null ]
}
$ my-cli --version
1.0.0
$ my-cli --help
my help message
import clinical from 'clinical'
version
(string
) – Required. Writes this string to stdout
on encountering the --version
or -v
flag, then exits the process
.helpMessage
(string
) – Required. Writes this string to stdout
on encountering the --help
or -h
flag, then exits the process
.args
(Array<string>
) – Optional. The arguments to be parsed. Defaults to process.argv.slice(2)
.The returned result
object has the following keys:
positionals
(Array<boolean | null | number | string>
)options
({ [key: string]: boolean | null | number | string }
)$ npm install --save clinical
FAQs
A minimum-viable arguments parser in ~90 LOC with zero dependencies
The npm package clinical receives a total of 0 weekly downloads. As such, clinical popularity was classified as not popular.
We found that clinical demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.