Socket
Socket
Sign inDemoInstall

optionator

Package Overview
Dependencies
6
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.1 to 0.8.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.8.2
- fix bug #18 - detect missing value when flag is last item
- update dependencies
# 0.8.1

@@ -2,0 +6,0 @@ - update `fast-levenshtein` dependency

2

lib/help.js

@@ -1,2 +0,2 @@

// Generated by LiveScript 1.4.0
// Generated by LiveScript 1.5.0
(function(){

@@ -3,0 +3,0 @@ var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp;

@@ -1,5 +0,5 @@

// Generated by LiveScript 1.4.0
// Generated by LiveScript 1.5.0
(function(){
var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice;
VERSION = '0.8.1';
VERSION = '0.8.2';
ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize;

@@ -20,3 +20,3 @@ deepIs = require('deep-is');

parseString = function(string){
var assignOpt, regex, replaceRegex, result;
var assignOpt, regex, replaceRegex, result, this$ = this;
assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*=';

@@ -48,3 +48,3 @@ regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g');

traverse = function(options){
var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames;
var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this;
if (toString$.call(options).slice(8, -1) !== 'Array') {

@@ -176,3 +176,3 @@ throw new Error('No options defined.');

parse = function(input, arg$){
var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName;
var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, checkProp, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName;
slice = (arg$ != null

@@ -317,2 +317,7 @@ ? arg$

};
checkProp = function(){
if (prop) {
throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required.");
}
};
switch (toString$.call(input).slice(8, -1)) {

@@ -355,5 +360,3 @@ case 'String':

result = that;
if (prop) {
throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required.");
}
checkProp();
short = result[1].length === 1;

@@ -442,2 +445,3 @@ argName = result[2];

}
checkProp();
checkMutuallyExclusive();

@@ -444,0 +448,0 @@ checkDependencies();

@@ -1,2 +0,2 @@

// Generated by LiveScript 1.4.0
// Generated by LiveScript 1.5.0
(function(){

@@ -7,3 +7,3 @@ var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin;

closestString = function(possibilities, input){
var distances, ref$, string, distance;
var distances, ref$, string, distance, this$ = this;
if (!possibilities.length) {

@@ -10,0 +10,0 @@ return;

{
"name": "optionator",
"version": "0.8.1",
"version": "0.8.2",
"author": "George Zahariev <z@georgezahariev.com>",

@@ -37,9 +37,9 @@ "description": "option parsing and help generation",

"levn": "~0.3.0",
"fast-levenshtein": "^1.1.0"
"fast-levenshtein": "~2.0.4"
},
"devDependencies": {
"livescript": "~1.4.0",
"mocha": "~2.3.4",
"livescript": "~1.5.0",
"mocha": "~3.0.2",
"istanbul": "~0.4.1"
}
}

@@ -26,3 +26,3 @@ # Optionator

MIT license. Version 0.8.1
MIT license. Version 0.8.2

@@ -29,0 +29,0 @@ npm install optionator

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc