New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dreamworld/web-util

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreamworld/web-util - npm Package Compare versions

Comparing version 1.5.1-development.1 to 1.5.1

12

history.js

@@ -70,3 +70,3 @@ import lastIndexOf from "lodash-es/lastIndexOf";

*/
export const navigate = (url, { replace, autoBack, title = "", state = {} }) => {
export const navigate = (url, { replace, autoBack, autoBackCount, title = "", state = {} }) => {
if (!url) {

@@ -77,4 +77,4 @@ console.warn("Router:navigate(): url is not provided");

if(autoBack) {
const count = getBackCount(url);
if(autoBack && autoBackCount) {
const count = getBackCount(url, autoBackCount);
if(count) {

@@ -104,3 +104,2 @@ go(-count);

const currentPageIndex = getCurrentPageIndex();
console.log('web util history called', currentPageIndex);
if (!currentPageIndex && fallbackCallback) {

@@ -174,3 +173,3 @@ fallbackCallback();

*/
export const getBackCount = (url) => {
export const getBackCount = (url, autoBackCount) => {
if(!url) {

@@ -184,3 +183,4 @@ return 0;

const urlIndex = lastIndexOf(historyList, getRelativeUrl(url));
return urlIndex >= 0 && urlIndex !== undefined ? (historyList.length - 1) - urlIndex: 0;
const count = urlIndex >= 0 && urlIndex !== undefined ? (historyList.length - 1) - urlIndex: 0;
return autoBackCount && autoBackCount >= count ? count: 0;
}

@@ -187,0 +187,0 @@

{
"name": "@dreamworld/web-util",
"version": "1.5.1-development.1",
"version": "1.5.1",
"description": "",

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

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