diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-24 14:41:48 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-24 14:41:48 +0200 |
commit | d25e11bee6ca5ca523884da132d18e1400e077b9 (patch) | |
tree | 8af39fde19f7ed640a60fb397c7edd647dff1c4c /node_modules/url-to-options/README.md | |
download | kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.gz kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.bz2 kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.zip |
Initial commit
Diffstat (limited to 'node_modules/url-to-options/README.md')
-rw-r--r-- | node_modules/url-to-options/README.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/url-to-options/README.md b/node_modules/url-to-options/README.md new file mode 100644 index 0000000..5158636 --- /dev/null +++ b/node_modules/url-to-options/README.md @@ -0,0 +1,29 @@ +# url-to-options [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] + +Convert a WHATWG [URL](https://developer.mozilla.org/en/docs/Web/API/URL) to an `http.request`/`https.request` options object. + + +## Installation + +[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line: +```shell +npm install url-to-options +``` + + +## Usage + +```js +const urlToOptions = require('url-to-options'); + +const url = new URL('http://user:pass@hostname:8080/'); + +const opts = urlToOptions(url); +//-> { auth:'user:pass', port:8080, … } +``` + + +[npm-image]: https://img.shields.io/npm/v/url-to-options.svg +[npm-url]: https://npmjs.org/package/url-to-options +[travis-image]: https://img.shields.io/travis/stevenvachon/url-to-options.svg +[travis-url]: https://travis-ci.org/stevenvachon/url-to-options |