Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

cli-list

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-list

Break CLI lists into arrays

Source
npmnpm
Version
0.1.5
Version published
Weekly downloads
460K
48.98%
Maintainers
1
Weekly downloads
 
Created
Source

cli-list

Break CLI lists into arrays

Installation

$ npm install --save cli-list

Usage

var list = require('cli-list');
var opts = list(process.argv.slice(2));

ES6 + Minimist:

import list from 'cli-list';
import minimist from 'minimist';
const opts = process.argv.slice(2).map(item => minimist(item));

Examples

Given:

$ test foo --bar, baz, --qux

Expect:

[['foo', '--bar'], ['baz'], ['--qux']]

Credits

jamen
Jamen Marzonie

FAQs

Package last updated on 29 Feb 2016

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