Comparing version 1.8.5 to 1.9.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135649
2502
2