Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

url-to-options

1.0.1 • Public • Published

url-to-options NPM Version Build Status

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

Installation

Node.js >= 4 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, … }

install

npm i url-to-options

Downloadsweekly downloads

1,710,672

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability