Socket
Socket
Sign inDemoInstall

url-to-options

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    url-to-options

Convert a WHATWG URL to an http(s).request options object.


Version published
Weekly downloads
1.6M
decreased by-12%
Maintainers
1
Install size
4.10 kB
Created
Weekly downloads
 

Readme

Source

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, … }

Keywords

FAQs

Last updated on 23 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc