Socket
Socket
Sign inDemoInstall

plsargs

Package Overview
Dependencies
5
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    plsargs

😎 Another Argument Parser: But it's supports quotes!


Version published
Weekly downloads
191
decreased by-20.08%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

PLSARGS

😎 Another Argument Parser: But it's supports quotes!

Supported Quote Types

  • ""
  • ''
  • ``
  • Or normal text without spaces..

Basic Usage Examples

import { plsParseArgs } from "plsargs"; // ES6
// OR //
const plsParse = require("plsargs").plsParseArgs; // ES5

let args = plsParse(`"hello world" 'nice world' withoutQuotes --argumentWithValue valueMoment --argumentWithValue2 "cool right?" --argumentWithoutValue`);

console.log(args.has("argumentWithoutValue"));
// => true

console.log(args.get("argumentWithoutValue"));
// => undefined

console.log(args.get("argumentWithValue"));
// => "valueMoment"

console.log(args.get("argumentWithValue2"));
// => "cool right?"

console.log(args._[0]);
// => "hello world"

console.log(args._[1]);
// => "nice world"

console.log(args._[2]);
// => "withoutQuotes"

Last updates:

  • Now supports down to ES5!
  • args.clone() now you can clone Results!
  • args.has(string|number) args has now supports checking keyless data.
  • args.get(string|number) args get now supports getting from keyless data.

Keywords

FAQs

Last updated on 21 May 2021

Did you know?

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

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