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

@fivethree/billy-core

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fivethree/billy-core - npm Package Compare versions

Comparing version 0.13.1 to 0.14.0

2

dist/core/app.js

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

return __awaiter(this, void 0, void 0, function* () {
if (p.options.optional && !p.value) {
if (p.options.optional && (!p.value && p.value !== false)) {
return p;

@@ -206,0 +206,0 @@ }

import { Validator } from "../types";
export declare const isNumber: Validator;
export declare const isNumberArray: () => Validator;
export declare const isBoolean: () => Validator;
export declare const isNumberArray: Validator;
export declare const isBoolean: Validator;
export declare const isString: Validator;
export declare const isStringArray: () => Validator;
export declare const isStringArray: Validator;
export declare const isExistingPath: Validator;
export declare const isNonExistingPath: Validator;

@@ -8,17 +8,13 @@ "use strict";

};
exports.isNumberArray = () => {
const validator = {
validate: (mapped) => mapped.filter(p => exports.isNumber.validate(p)).length === 0,
mapBefore: (list) => list.replace(', ', ',').split(','),
invalidText: () => `Please specify a comma separated list of numbers.`
};
return validator;
exports.isNumberArray = {
validate: (mapped) => mapped.filter(p => exports.isNumber.validate(p)).length === 0,
mapBefore: (list) => list.replace(', ', ',').split(','),
invalidText: () => `Please specify a comma separated list of numbers.`
};
exports.isBoolean = () => {
const validator = {
validate: (mapped) => mapped,
mapBefore: (value) => ['false', 'true', true, false, 'yes', 'no', 'y', 'n', '1', '0'].some(s => s === value),
invalidText: () => `The parameter should be of type boolean. (Usage: [true/false , y/n, ...])`
};
return validator;
exports.isBoolean = {
validate: (value) => ['false', 'true', true, false, 'yes', 'no', 'y', 'n', '1', '0'].some(s => s === value),
mapAfter: (value) => {
return ['true', true, 'yes', 'y', '1'].some(s => s === value);
},
invalidText: () => `The parameter should be of type boolean. (Usage: [true/false , y/n, ...])`
};

@@ -29,9 +25,6 @@ exports.isString = {

};
exports.isStringArray = () => {
const validator = {
validate: (mapped) => mapped.filter(p => exports.isString.validate(p)).length === 0,
mapBefore: (list) => list.replace(', ', ',').split(','),
invalidText: () => `Please specify a comma seperated list.`
};
return validator;
exports.isStringArray = {
validate: (mapped) => mapped.filter(p => exports.isString.validate(p)).length === 0,
mapBefore: (list) => list.replace(', ', ',').split(','),
invalidText: () => `Please specify a comma seperated list.`
};

@@ -38,0 +31,0 @@ exports.isExistingPath = {

{
"name": "@fivethree/billy-core",
"version": "0.13.1",
"version": "0.14.0",
"description": "cli plugin system core.",

@@ -5,0 +5,0 @@ "repository": {

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