Socket
Socket
Sign inDemoInstall

@wezom/cli-arguments

Package Overview
Dependencies
16
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

1

lib/CliArguments.d.ts

@@ -5,2 +5,3 @@ import { Argv } from 'yargs';

constructor(source?: string[]);
protected getArgvValue(key: string): unknown;
getString(key: string): string | null;

@@ -7,0 +8,0 @@ getNumber(key: string): number | null;

2

lib/CliArguments.js

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

"use strict";var r=require("yargs"),e=require("yargs/helpers");exports.CliArguments=class{constructor(t=process.argv){const n=r(e.hideBin(t)).argv;if("object"!=typeof n||null===n||"then"in n)throw new Error("CliArguments got Argv as Promise!");this.argv=n}getString(r){const e=this.argv[r];return"string"==typeof e&&e.length>0?e:null}getNumber(r){const e=this.argv[r];return"number"==typeof e&&Number.isFinite(e)?e:null}getBoolean(r){const e=this.argv[r];return"boolean"==typeof e?e:null}};
"use strict";var r=require("yargs"),e=require("yargs/helpers");exports.CliArguments=class{constructor(t=process.argv){const n=r(e.hideBin(t)).argv;if("object"!=typeof n||null===n||"then"in n)throw new Error("CliArguments got Argv as Promise!");this.argv=n}getArgvValue(r){const e=this.argv[r];return Array.isArray(e)?e[e.length-1]:e}getString(r){const e=this.getArgvValue(r);return"string"==typeof e&&e.length>0?e:null}getNumber(r){const e=this.getArgvValue(r);return"number"==typeof e&&Number.isFinite(e)?e:null}getBoolean(r){const e=this.getArgvValue(r);return"boolean"==typeof e?e:null}};
{
"name": "@wezom/cli-arguments",
"version": "0.1.1",
"version": "0.1.2",
"description": "The tiny wrapper over the `yargs` lib",

@@ -69,5 +69,5 @@ "main": "lib/index.js",

"format": "prettier \"./src/**/*.ts\" --write --check",
"local-pr-ready-check": "pnpm run format && pnpm run lint-with-autofix && pnpm run test",
"local-pr-ready-check": "pnpm run format && pnpm run lint-with-autofix && pnpm run test-with-coverage && pnpm run build",
"ci-test": "pnpm run lint && pnpm run test"
}
}

@@ -11,6 +11,6 @@ # @wezom/cli-arguments

| Statements | Branches | Functions | Lines |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| ![Statements](https://img.shields.io/badge/statements-90%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-87.5%25-yellow.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-90%25-brightgreen.svg?style=flat) |
| Statements | Branches | Functions | Lines |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| ![Statements](https://img.shields.io/badge/statements-91.66%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-88.88%25-yellow.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-91.66%25-brightgreen.svg?style=flat) |
---

Sorry, the diff of this file is not supported yet

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