Socket
Socket
Sign inDemoInstall

history

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

history - npm Package Compare versions

Comparing version 1.8.5 to 1.9.0

umd/History.js

23

lib/createLocation.js

@@ -31,14 +31,18 @@ 'use strict';

var index = path.indexOf('?');
var pathname = path;
var search = '';
var hash = '';
var pathname = undefined,
search = undefined;
if (index !== -1) {
pathname = path.substring(0, index);
search = path.substring(index);
} else {
pathname = path;
search = '';
var hashIndex = pathname.indexOf('#');
if (hashIndex !== -1) {
hash = pathname.substring(hashIndex);
pathname = pathname.substring(0, hashIndex);
}
var searchIndex = pathname.indexOf('?');
if (searchIndex !== -1) {
search = pathname.substring(searchIndex);
pathname = pathname.substring(0, searchIndex);
}
if (pathname === '') pathname = '/';

@@ -49,2 +53,3 @@

search: search,
hash: hash,
state: state,

@@ -51,0 +56,0 @@ action: action,

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

// remove rest and push new
if (current < entries.length - 1) {
if (current < entries.length) {
entries.splice(current);

@@ -132,0 +132,0 @@ }

{
"name": "history",
"version": "1.8.5",
"version": "1.9.0",
"description": "A minimal, functional history implementation for JavaScript",

@@ -13,4 +13,4 @@ "main": "lib/index",

"build": "babel ./modules -d lib --ignore '__tests__'",
"build-umd": "NODE_ENV=production webpack modules/index.js lib/umd/History.js",
"build-min": "NODE_ENV=production webpack -p modules/index.js lib/umd/History.min.js",
"build-umd": "NODE_ENV=production webpack modules/index.js umd/History.js",
"build-min": "NODE_ENV=production webpack -p modules/index.js umd/History.min.js",
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",

@@ -17,0 +17,0 @@ "test": "eslint modules && karma start",

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