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

@zambezi/address

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zambezi/address - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1-replace-state.0

30

lib/address.js

@@ -783,3 +783,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

if(zapp.isRoot(node)) location.pushState(uri)
if(resourceWillChange(req, res, node)) dispatchEvent(node, 'resourcewillchange')

@@ -945,3 +944,3 @@ dispatchEvent(node, 'update', {detail : { from : zapp.resource(node), to : uri }})

, setState: setState
, pushState: pushState
, pushState: deprecatedPushState
, openNewWindow: openNewWindow

@@ -968,8 +967,8 @@ , basePath: basePath

function pushState(path) {
if (~path.indexOf('#/')) {
path = '/' + trimSlashes(path.split('#/')[1])
}
function trimPath(path) {
return '/' + trimSlashes(~path.indexOf('#/')? path.split('#/')[1] : path)
}
path = unbase(path)
function updateState(path, method) {
path = unbase(trimPath(path))

@@ -979,3 +978,3 @@ if (path === getState()) {

} else {
history.pushState({ base: base, path: path }, null, rebase(path))
method({ base: base, path: path }, null, rebase(path))
return path

@@ -985,2 +984,15 @@ }

function deprecatedPushState(path) {
console.warn('deprecated : location.pushState, to be removed in v.4.0.0.')
return pushState(path)
}
function pushState(path) {
return updateState(path, history.pushState.bind(history))
}
function replaceState(path) {
return updateState(path, history.replaceState.bind(history))
}
function openNewWindow(path, target) {

@@ -1101,3 +1113,3 @@ return window.open(rebase(path), target, '')

function trimSlashes(path) {
return (path || '').replace(/^\/+/, '').replace(/\/+$/, '')
return (path || '').replace(/^\/+|\/+$/g, '')
}

@@ -1104,0 +1116,0 @@ }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))

{
"name": "@zambezi/address",
"version": "3.0.0",
"version": "3.0.1-replace-state.0",
"description": "API for nap resources",

@@ -5,0 +5,0 @@ "main": "lib/address.js",

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