Socket
Socket
Sign inDemoInstall

mobx-history-api

Package Overview
Dependencies
2
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

10

history.es6.js

@@ -66,3 +66,3 @@ import { __decorate } from 'tslib';

const { locales, _url } = this;
return locales ? _url.replace(new RegExp(`^/(${locales})(/|$)`), '/') : _url;
return locales ? _url.replace(new RegExp(`^/(${locales})((/)|(\\?|#|$))`), '/$4') : _url;
}

@@ -197,3 +197,9 @@ get path() {

const mainCallback = () => {
callback(!locale ? url : url === '/' ? `/${locale}` : `/${locale}${url}`);
if (locale) {
const match = url.match(/^([^?#]*)(.*)/);
callback(match[1] === '/' ? `/${locale}${match[2]}` : `/${locale}${url}`);
}
else {
callback(url);
}
this.onChange(window.history.state);

@@ -200,0 +206,0 @@ };

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

var _a = this, locales = _a.locales, _url = _a._url;
return locales ? _url.replace(new RegExp("^/(" + locales + ")(/|$)"), '/') : _url;
return locales ? _url.replace(new RegExp("^/(" + locales + ")((/)|(\\?|#|$))"), '/$4') : _url;
},

@@ -242,3 +242,9 @@ enumerable: false,

var mainCallback = function () {
callback(!locale ? url : url === '/' ? "/" + locale : "/" + locale + url);
if (locale) {
var match = url.match(/^([^?#]*)(.*)/);
callback(match[1] === '/' ? "/" + locale + match[2] : "/" + locale + url);
}
else {
callback(url);
}
_this.onChange(window.history.state);

@@ -245,0 +251,0 @@ };

2

package.json
{
"name": "mobx-history-api",
"version": "1.1.1",
"version": "1.1.2",
"description": "Browser History API with Mobx",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,3 +28,3 @@ # mobx-history-api

```
*`url` does not include locale*
*`url` does not include locale and every time starts from `/`*
### path ![string](https://img.shields.io/badge/-string-green)

@@ -31,0 +31,0 @@ This is an observable field, returns current pathname of URL.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc