Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
simple-argparse
Advanced tools
Simple Argument parser for Command-line Applications
Aspect | Detail |
---|---|
Version | 0.0.0-alpha.1.0 |
Node | 0.11, 0.10, 0.8, 0.6 |
Last Updated | 13th Oct, 2014 |
$ npm install simple-argparse
require("simple-argparse")
.description("Application Description")
.version("0.3.0")
.option("start", "starts application", startFunc)
.epilog("See License at http://opensource.org/licenses/MIT")
.parse()
function startFunc(host, port) {
app.listen(port, host);
}
Sample Output:
$ node Sample.js
Application Description
help show this help information
start starts application
version show version information
See License at http://opensource.org/licenses/MIT
The module exports a new Parser, that can be used immediately. If you wish to create more Parsers, you could:
var Parser = require("simple-argparse").Parser;
var myParser = new myParser();
While instantiating a parser, an output function may be registered with
the parser other than the default console.log
var myOtherParser = new myParser(function(output) {
socket.emit("commandComplete", output);
});
A Parser has these methods:
name:(Optional) preferably refers to the name of your Application
description: provides a description of your Application
parser#version(version:String)
version: provides version information of your Application
defaults to "0.0.0"
parser#option(command:String, description:String [, optionFunction:Function])
command:
description: information regarding this command
optionFunction:(Optional)
$ node Sample.js start localhost 9999
startFunc
parser#epilog(epilog:String)
epilog: a string that will appear at the bottom of help information
parser#parse([arguments:String])
arguments:(Optional)
process.argv
will be used insteadparser#showHelp()
parser#showVersion()
Copyright (c) 2014 Forfuture LLC
Simple-argparse and its source code is issued under the MIT license.
FAQs
Simple Argument parser for Command-line Applications
The npm package simple-argparse receives a total of 2 weekly downloads. As such, simple-argparse popularity was classified as not popular.
We found that simple-argparse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.