
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
parse-argsv
Advanced tools
A simple Node.js command-line arguments parser.
Note #1 This module
can be used with any existing version of node.js
and npm
.
By using npmjs.org
:
npm install parse-argsv --global --save
npm install parse-argsv --save
parse-argsv
module installed:
'use strict'
var ArgsParser = require('parse-argsv');
var argsv = new ArgsParser();
// Retrieve an array of command-line arguments and its values
console.log("\nCommand line arguments: " + JSON.stringify(argsv.parseArgs("=")));
// Get value of a single command-line argument by its name
console.log("\nParam: { \"hello\" } Value: {\"" + argsv.getParam("hello") + "\"}");
console.log("\nParam: { \"oops\" } Value: {\"" + argsv.getParam("oops") + "\"}");
// Verify if a command-line argument exists
console.log("\nParam: { \"grand\" } Is Set: {\"" + argsv.isSet("grand") + "\"}");
.ArgvParser
#####.ArgvParser()
ArgvParser - constructs a command-line arguments parser object,
parses the command-line and returns an associative array of arguments and its values separated by a delimiter
.
Warning: The using of all other ArgvParser
object's methods is only possible after calling parseArgs
method.
returns a value of an argument with a specific param
name. If an argument with the given name does not exists,
this method will return {Not_Found}
, and {Not_Set}
, in case when the value of an argument is missing.
performs a verification whether a value of an argument with the given name is set. This method can only be used when
the command-line contains at least one argument which pair of its name
and value
are separated by the delimiter (e.g. mode='open').
This method returns true
if the value of an argument is set and false
unless otherwise.
That's All Folks :)
Arthur V. Ratz @ Epsilon Software Development Labs.
FAQs
A simple and reliable Node.js command-line arguments parser
We found that parse-argsv 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.