Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stdio

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stdio - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

javascripts/prism.js

7

main.js

@@ -70,2 +70,3 @@ /*jslint node: true, nomen: true, vars: true, plusplus: true*/

usage += 'node ' + argvBackup[1].split('/').pop() + ' [OPTIONS] ' + (extra || '');
usage += ', where OPTIONS are:';
console.log(usage);

@@ -102,5 +103,5 @@ process.stdout.write(opts.createHelp());

} else {
} else if (arg.charAt(1).match(/[a-zA-Z]/)) {
// It's a short option (or many one)
// It's a negative number, a short option (or many one)

@@ -134,3 +135,3 @@ var keys = arg.substring(1).split('');

if (argv[i + 1] && argv[i + 1][0] !== '-') {
if (argv[i + 1]) {

@@ -137,0 +138,0 @@ // Arguments asociated with this option

{
"name": "stdio",
"version": "0.1.1",
"version": "0.1.2",
"description": "Module for standard input/output management with NodeJS",

@@ -5,0 +5,0 @@ "keywords": ["input", "console", "output", "terminal", "system"],

@@ -5,2 +5,4 @@ Module for input/output management with nodejs.

Website: http://sgmonda.github.io/stdio/
## 1. Installation

@@ -118,2 +120,6 @@

### 0.1.2
* Bug fix: Negative numbers as parameters caused wrong errors.
### 0.1.1

@@ -120,0 +126,0 @@

@@ -123,3 +123,19 @@ /*jslint node: true, nomen: true*/

spectedOps: {joint2: true}
}
},
{
opsSpecification: {
'number': {key: 'n', args: 2},
'other': {key: 'o'}
},
argv: ['node', 'program.js', '-n', '-33', '-237', '--other'],
spectedOps: {'number': ['-33', '-237'], 'other': true}
},
{
opsSpecification: {
'number': {key: 'n', args: 2},
'other': {key: 'o'}
},
argv: ['node', 'program.js', '-n', '33', '-237'],
spectedOps: {'number': ['33', '-237']}
},
];

@@ -126,0 +142,0 @@

# TODO
- [ ] Support a list of many arguments for an option (without a fixed length). {..., args: '*'}
- [ ] Support enumerated options. Help must say something like --whatever <something|another|last>
- [ ] Support arguments suggestions when a non-supported one is detected
- [ ] Support default values for options
- [ ] Support mandatory extra args
- [ ] Create a stdio.inspect() function to inspect objects with color (maybe integrated with printf)
- [X] Add a function to print usage
- [ ] Support grouped short options, like `-pnd` instead of `-p -n -d`
- [X] Support grouped short options, like `-pnd` instead of `-p -n -d`
- [X] Make single value options more friendly (avoid usage of option.args)
- [X] Add support for mandatory arguments (throwing an error if not included)
- [X] Support mandatory options
- [ ] Support enumerated options. Help must say something like --whatever <something|another|last>
- [ ] Support arguments suggestions when a non-supported one is detected
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