Permalink
Cannot retrieve contributors at this time
48 lines (34 sloc)
956 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/arrgv/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Arrgv | |
Parsing string to array of args like node on bash do. | |
[![Build Status][travis-image]][travis-url] | |
[![NPM version][npm-image]][npm-url] | |
When you type something like `node script.js bla bla bla` in shell and do `myArgs = process.argv.slice(2)` you get the same. All slashes, quotes and special symbols are handled same way. | |
## Install | |
```bash | |
npm install arrgv | |
``` | |
## Tests | |
```bash | |
$ npm test | |
``` | |
## Use cases | |
1. `spawn` a command that is given as a string | |
2. test `argv` parser with complicated example string | |
3. something else | |
## Example | |
```js | |
var arrgv = require('arrgv'); | |
var str = '-param --format="hh:mm:ss" filename.ext'; | |
console.log(arrgv(str)); | |
/* | |
['-param', | |
'--format=hh:mm:ss', | |
'filename.ext' ] | |
*/ | |
``` | |
## License | |
MIT | |
[travis-url]: https://travis-ci.org/astur/arrgv | |
[travis-image]: https://travis-ci.org/astur/arrgv.svg?branch=master | |
[npm-url]: https://npmjs.org/package/arrgv | |
[npm-image]: https://badge.fury.io/js/arrgv.svg |