Innovenergy_trunk/frontend/node_modules/url-to-options
Kim 085d7c68ba adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
..
LICENSE adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
README.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
index.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
package.json adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00

README.md

url-to-options NPM Version Build Status

Convert a WHATWG URL to an http.request/https.request options object.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install url-to-options

Usage

const urlToOptions = require('url-to-options');

const url = new URL('http://user:pass@hostname:8080/');

const opts = urlToOptions(url);
//-> { auth:'user:pass', port:8080, … }