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

url-parse

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-parse - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

index.js

@@ -113,3 +113,3 @@ 'use strict';

//
if (parser) url.query = parser(url.query);
if (parser && url.query) url.query = parser(url.query);

@@ -116,0 +116,0 @@ //

{
"name": "url-parse",
"version": "1.0.2",
"description": "Parse URL in node using the URL module and in the browser using the DOM",
"version": "1.0.3",
"description": "Small footprint URL parser that works seamlessly across Node.js and browser environments",
"main": "index.js",

@@ -30,8 +30,8 @@ "scripts": {

"devDependencies": {
"assume": "1.1.x",
"browserify": "8.1.x",
"assume": "1.3.x",
"browserify": "11.2.x",
"istanbul": "0.3.x",
"mocha": "2.1.x",
"mochify": "2.4.x",
"pre-commit": "1.0.x",
"mocha": "2.2.x",
"mochify": "2.13.x",
"pre-commit": "1.1.x",
"testling": "1.7.x"

@@ -38,0 +38,0 @@ },

@@ -60,5 +60,6 @@ # url-parse

- `protocol`: Without slashes `http:`.
- `protocol`: Requested protocol without slashes (e.g. `http:`).
- `username`: Username of basic authentication.
- `password`: Password of basic authentication.
- `auth`: Authentication information portion (e.g. `username:password`).
- `host`: Host name with port number.

@@ -69,3 +70,3 @@ - `hostname`: Host name without port number.

- `query`: Parsed object containing query string, unless parsing is set to false.
- `hash`: Prefixed with `#`
- `hash`: The "fragment" portion of the URL including the pound-sign (`#`).
- `href`: The full URL.

@@ -72,0 +73,0 @@

@@ -27,2 +27,9 @@ describe('url-parse', function () {

it('does not add question mark to href if query string empty', function () {
var url = 'http://google.com/'
, data = parse(url, true);
assume(data.href).equals(url);
});
it('allows a custom function as parser', function () {

@@ -29,0 +36,0 @@ var url = 'http://google.com/?foo=bar'

Sorry, the diff of this file is not supported yet

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