Socket
Socket
Sign inDemoInstall

string-argv

Package Overview
Dependencies
0
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

2

CHANGELOG.md

@@ -5,3 +5,3 @@ # Changelog

**Dev Experience Changes**
- Project now compiled with TypeScript and provides typings [7415c2](https://github.com/mccormicka/string-argv/commit/7415c20121bfa02887162b8326042563b903c332)
- Project now compiled with TypeScript and provides typings

@@ -8,0 +8,0 @@ ## v0.2.0 (2019-04-14)

{
"name": "string-argv",
"description": "string-argv parses a string into an argument array to mimic process.argv. This is useful when testing Command Line Utilities that you want to pass arguments to.",
"version": "0.3.0",
"version": "0.3.1",
"contributors": [

@@ -6,0 +6,0 @@ {

@@ -14,12 +14,20 @@

```js
var stringArgv = require('string-argv');
var args = stringArgv(
'-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',
'node',
'testing.js'
```ts
// Typescript
import stringArgv from 'string-argv';
const args = stringArgv(
'-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',
'node',
'testing.js'
);
//legacy
var args2 = stringArgv.parseArgsStringToArgv(
console.log(args);
```
```js
// Javascript
var { parseArgsStringToArgv } = require('string-argv');
var args = parseArgsStringToArgv(
'-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',

@@ -26,0 +34,0 @@ 'node',

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