# vurl

> Make a url look like vargs

Latest version **1.0.0** (published 2016-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install vurl
pnpm add vurl
yarn add vurl
bun add vurl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-03-23 |
| First published | 2016-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Quentin Engles |
| Maintainers | hollowdoor |
| Keywords | url, vargs |

## Links

- npm: https://www.npmjs.com/package/vurl
- Repository: https://github.com/hollowdoor/vurl
- Homepage: https://github.com/hollowdoor/vurl#readme
- Issues: https://github.com/hollowdoor/vurl/issues
- npm.io page: https://npm.io/package/vurl

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-03-23

## README

vurl
====

Install
-------

`npm install --save vurl`

Example
-------

Using the `minimist` module:

```javascript
var vurl = require('vurl'),
    minimist = require('minimist');

//The current url
//mydomain.com/one/two?bla&color=blue&c
console.log(minimist(vurl()));
```

The output from running the above: `{_:['one', 'two'], bla: true, c: true, color: 'blue'}`

Raw output from calling `vurl`: `['one', 'two', '--bla', '--color', 'blue', '-c']`

About
-----

This is one attempt at making javascript act the same when in the command line, or the browser.

Facilities to parse `process.argv` are much more prevalent in the javascript ecosystem. Maybe when you have a webpage you can use those facilities too.

`vurl` uses the `pathname` as the positional arguments, and the query string as the flags.

When you call `vurl` in a browser environment it transforms the url into the same thing as if you called node on your script and did `process.argv.slice(2)` in that script.

In a node command line script `vurl` just does the `process.argv.slice(2)` for you.

`vurl` has no dependencies.

---
_Source: https://npm.io/package/vurl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
