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

dom-utils

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-utils - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

4

CHANGELOG.md
Changelog
=========
### 0.9.0 (January 24, 2017)
* Remove non-standard properties from the parseUrl location objecct
### 0.8.0 (January 11, 2017)

@@ -5,0 +9,0 @@

8

lib/parse-url.js

@@ -13,4 +13,3 @@ const HTTP_PORT = '80';

* @param {string} url The url to parse.
* @return {!Object} An object with the same properties as a `Location`
* plus the convience properties `path` and `query`.
* @return {!Object} An object with the same properties as a `Location`.
*/

@@ -62,8 +61,3 @@ export default function parseUrl(url) {

search: a.search,
// Expose additional helpful properties not part of the Location object.
fragment: a.hash.slice(1), // The hash without the starting "#".
path: pathname + a.search, // The pathname and the search query (w/o hash).
query: a.search.slice(1), // The search without the starting "?".
};
}
{
"name": "dom-utils",
"version": "0.8.0",
"version": "0.9.0",
"description": "A small, modular DOM utilities library",

@@ -48,2 +48,7 @@ "scripts": {

[
"OS X 10.12",
"safari",
"10"
],
[
"OS X 10.11",

@@ -50,0 +55,0 @@ "safari",

@@ -11,3 +11,2 @@ import assert from 'assert';

assert.deepEqual(url, {
fragment: 'hash',
hash: '#hash',

@@ -18,7 +17,5 @@ host: 'www.example.com:1234',

origin: 'https://www.example.com:1234',
path: '/path/to/file.html?a=b&c=d',
pathname: '/path/to/file.html',
port: '1234',
protocol: 'https:',
query: 'a=b&c=d',
search: '?a=b&c=d',

@@ -32,3 +29,2 @@ });

assert.deepEqual(url, {
fragment: '',
hash: '',

@@ -39,7 +35,5 @@ host: 'example.com',

origin: 'http://example.com',
path: '/',
pathname: '/',
port: '',
protocol: 'http:',
query: '',
search: '',

@@ -53,7 +47,4 @@ });

// Specified portions of the URL.
assert.equal(url.fragment, 'hash');
assert.equal(url.hash, '#hash');
assert.equal(url.path, '/path/to/file.html?a=b&c=d');
assert.equal(url.pathname, '/path/to/file.html');
assert.equal(url.query, 'a=b&c=d');
assert.equal(url.search, '?a=b&c=d');

@@ -82,7 +73,4 @@

// Specified portions of the URL.
assert.equal(url.fragment, 'hash');
assert.equal(url.hash, '#hash');
assert.equal(url.path, pathname + '?a=b&c=d');
assert.equal(url.pathname, pathname);
assert.equal(url.query, 'a=b&c=d');
assert.equal(url.search, '?a=b&c=d');

@@ -127,7 +115,4 @@

// Assumes the tests are hosted at `/test/`;
assert.equal(url.fragment, '');
assert.equal(url.hash, location.hash);
assert.equal(url.path, location.pathname + location.search);
assert.equal(url.pathname, location.pathname);
assert.equal(url.query, '');
assert.equal(url.search, location.search);

@@ -134,0 +119,0 @@

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