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

cmdenv

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmdenv - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

15

index.js

@@ -17,3 +17,3 @@ /**

commander.parse = function(argv) {
var result = parse(argv)
var result = parse(argv) || commander

@@ -65,9 +65,14 @@ if (result.options.length > 0) {

if (require.main === module) {
var result = cmdenv('prefix')
var _result = cmdenv('prefix')
.option('-m --mongodb [url]', 'Set the mongodb server address')
.option('-r --redis-server [url]', 'Set the redis server address')
.parse(process.argv)
console.log(result);
console.log('\nexport PREFIX_MONGODB or PREFIX_REDIS_SERVER to set environmental value for -m or -r');
console.log('\nmongodb: %s, redis-server: %s', result.mongodb, result.redisServer)
if (!_result.mongodb && !_result.redisServer) {
console.log('Example:\n');
console.log(_result.optionHelp());
console.log('\nexport PREFIX_MONGODB or PREFIX_REDIS_SERVER to set environmental value for -m or -r');
}
console.log('\nmongodb: %s, redis-server: %s', _result.mongodb, _result.redisServer)
}
{
"name": "cmdenv",
"version": "0.1.0",
"version": "0.2.0",
"description": "Node.js command line options parser use environment variables as fallback.",

@@ -5,0 +5,0 @@ "main": "index.js",

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