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

@umijs/route-utils

Package Overview
Dependencies
Maintainers
14
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umijs/route-utils - npm Package Compare versions

Comparing version 1.0.26 to 1.0.27

8

dist/getFlatMenus/getFlatMenus.js

@@ -12,8 +12,4 @@ /**

}
if (item.path !== '/') {
menus[item.path || item.key || '/'] = { ...item };
}
else {
menus[item.key || item.path || '/'] = { ...item };
}
menus[item.path || item.key || '/'] = { ...item };
menus[item.key || item.path || '/'] = { ...item };
if (item.children) {

@@ -20,0 +16,0 @@ menus = { ...menus, ...getFlatMenus(item.children) };

@@ -291,3 +291,3 @@ import getMatchMenu from './getMatchMenu';

test('test yfd layout config', () => {
let openMenuItems = getMatchMenu('/bkmng/authority/my', [
const openMenuItems = getMatchMenu('/bkmng/authority/my', [
{

@@ -345,6 +345,7 @@ path: '/',

]);
expect(openMenuItems.length).toBe(1);
expect(openMenuItems[0].path).toBe('/bkmng/authority/my');
expect(openMenuItems.length).toBe(2);
expect(openMenuItems[0].path).toBe('/bkmng/authority');
expect(openMenuItems[1].path).toBe('/bkmng/authority/my');
expect(openMenuItems).toMatchSnapshot();
});
//# sourceMappingURL=getMatchMenu.test.js.map

@@ -20,7 +20,4 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

if (item.path !== '/') {
menus[item.path || item.key || '/'] = _objectSpread({}, item);
} else {
menus[item.key || item.path || '/'] = _objectSpread({}, item);
}
menus[item.path || item.key || '/'] = _objectSpread({}, item);
menus[item.key || item.path || '/'] = _objectSpread({}, item);

@@ -27,0 +24,0 @@ if (item.children) {

@@ -27,7 +27,4 @@ "use strict";

if (item.path !== '/') {
menus[item.path || item.key || '/'] = _objectSpread({}, item);
} else {
menus[item.key || item.path || '/'] = _objectSpread({}, item);
}
menus[item.path || item.key || '/'] = _objectSpread({}, item);
menus[item.key || item.path || '/'] = _objectSpread({}, item);

@@ -34,0 +31,0 @@ if (item.children) {

{
"name": "@umijs/route-utils",
"version": "1.0.26",
"version": "1.0.27",
"description": "Quickly process the routing of umi",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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