Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

normalize-url

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-url - npm Package Compare versions

Comparing version 1.8.0 to 1.9.0

5

index.js

@@ -38,2 +38,3 @@ 'use strict';

normalizeProtocol: true,
normalizeHttps: false,
stripFragment: true,

@@ -57,2 +58,6 @@ stripWWW: true,

if (opts.normalizeHttps && urlObj.protocol === 'https:') {
urlObj.protocol = 'http:';
}
if (!urlObj.hostname && !urlObj.pathname) {

@@ -59,0 +64,0 @@ throw new Error('Invalid URL');

2

package.json
{
"name": "normalize-url",
"version": "1.8.0",
"version": "1.9.0",
"description": "Normalize a URL",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -55,2 +55,17 @@ # normalize-url [![Build Status](https://travis-ci.org/sindresorhus/normalize-url.svg?branch=master)](https://travis-ci.org/sindresorhus/normalize-url)

##### normalizeHttps
Type: `boolean`<br>
Default: `false`
Normalize `https:` URLs to `http:`.
```js
normalizeUrl('https://sindresorhus.com:80/');
//=> 'https://sindresorhus.com'
normalizeUrl('https://sindresorhus.com:80/', {normalizeHttps: true});
//=> 'http://sindresorhus.com'
```
##### stripFragment

@@ -57,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc