🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

get-arguments-lib

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-arguments-lib

Gets argument as switches with double dash, and return a dictionary object

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Get arguments as a dictonary object

Instalation

npm

$ npm install get-arguments-lib --save

yarn

$ yarn add get-arguments-lib -S

Usage

$ node <your js  file> --port 3004 --host myHost

const processArguments = getArguments(process.argv);
const port = processArguments.port ? +processArguments.port : 3000;
const host = processArguments.host;

// port value is 3004
// host value is 'myHost'

FAQs

Package last updated on 21 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts