New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

passed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passed

command line argument parser

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

passed

Install

From NPM:
npm install passed

From GitHub:
npm install xist/passed

Example

const app = passed("my command here --myOption John -myFlag");
// const app = passed(process.argv); <- You can do this too!

app.getCommand(); // my command here
app.getOptions(); // { myOption: "John", myFlag: true }
app.getOption("myOption"); // John
app.getOption("myFlag"); // true

That's it! 😜 You now have access to the passed options.

Extras

You can even handle commands using .on.

app.on("my command here", function(options) {
  // the first .on to match gets called, others get ignored
});

Contribute

Pull requests are encouraged.

Keywords

FAQs

Package last updated on 19 Mar 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc