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

@webank/fes-core

Package Overview
Dependencies
Maintainers
12
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webank/fes-core - npm Package Compare versions

Comparing version 0.4.0 to 0.4.4

4

package.json
{
"name": "@webank/fes-core",
"version": "0.4.0",
"version": "0.4.4",
"description": "一个好用的前端管理台快速开发框架",

@@ -32,3 +32,3 @@ "scripts": {

},
"gitHead": "0a72fba6361c1da954027a5301b56c85e531441e"
"gitHead": "da5c8d73d5b24ab162b0d4093aca6329cc8e7602"
}

@@ -10,18 +10,19 @@ import _ from 'lodash';

const util = {
// 验证一个path是否可以访问, 空的allowPage可以访问任何路由
// 验证一个path是否可以访问
canRoute(path, allowPage) {
path = path.split('?')[0];
if (Array.isArray(allowPage) && allowPage.length > 0) {
if (path === '' && allowPage.includes('/')) return true;
if (path) {
for (let i = 0; i < allowPage.length; i++) {
if (path === allowPage[i]) {
return true;
}
// 支持*匹配
const reg = new RegExp(`^${allowPage[i].replace('*', '.+')}$`);
if (reg.test(path)) {
return true;
}
// 当路由为“/"时,传入的path为“”
if (path === '') {
path = '/';
}
for (let i = 0; i < allowPage.length; i++) {
if (path === allowPage[i]) {
return true;
}
// 支持*匹配
const reg = new RegExp(`^${allowPage[i].replace('*', '.+')}$`);
if (reg.test(path)) {
return true;
}
}

@@ -88,3 +89,11 @@ }

};
objectUtil.merge(util, domUtil, objectUtil, typeUtil, { format }, { event }, { history });
export default util;
export default {
...util,
...domUtil,
...objectUtil,
...typeUtil,
format,
event,
history
};
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