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

@replit/clui-input

Package Overview
Dependencies
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replit/clui-input - npm Package Compare versions

Comparing version

to
0.0.8

README.md

17

dist/ast.js

@@ -105,2 +105,15 @@ "use strict";

};
var pasrseValue = function (_a) {
var value = _a.value, type = _a.type;
switch (type) {
case 'boolean':
return !!value;
case 'int':
return parseInt(value, 10);
case 'float':
return parseFloat(value);
default:
return value;
}
};
exports.toArgs = function (command) {

@@ -123,3 +136,5 @@ var e_3, _a, e_4, _b;

if (str) {
var value = arg.ref.type ? arg.ref.type(str) : str;
var value = arg.ref.type
? pasrseValue({ value: str, type: arg.ref.type })
: str;
parsed[arg.key.name] =

@@ -126,0 +141,0 @@ typeof value === 'string' ? removeQuotes(value) : value;

2

dist/parser.js

@@ -89,3 +89,3 @@ "use strict";

var argNode = void 0;
if (argCtx.type === Boolean) {
if (argCtx.type === 'boolean') {
argNode = {

@@ -92,0 +92,0 @@ parent: cmdNodeCtx,

@@ -8,3 +8,3 @@ export interface IOption<D = any> {

}
export declare type ArgTypeDef = BooleanConstructor | StringConstructor | NumberConstructor;
export declare type ArgTypeDef = 'boolean' | 'string' | 'int' | 'float';
export interface IArgsOption {

@@ -11,0 +11,0 @@ value: string;

{
"name": "@replit/clui-input",
"version": "0.0.7",
"version": "0.0.8",
"description": "A utility library for building CLI style interfaces with autocomplete",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet