@umijs/route-utils
Advanced tools
Comparing version 1.0.34 to 1.0.35
@@ -1,5 +0,5 @@ | ||
import isEqual from 'lodash.isequal'; | ||
import isEqual from 'fast-deep-equal/es6/index'; | ||
import memoizeOne from 'memoize-one'; | ||
import hash from 'hash.js'; | ||
import { pathToRegexp } from '@qixian.cs/path-to-regexp'; | ||
import sha265 from '../sha265'; | ||
export function stripQueryStringAndHashFromPath(url) { | ||
@@ -16,3 +16,3 @@ return url.split('?')[0].split('#')[0]; | ||
try { | ||
return `/${hash.sha256().update(JSON.stringify(item)).digest('hex')}`; | ||
return `/${sha265(JSON.stringify(item))}`; | ||
} | ||
@@ -19,0 +19,0 @@ catch (error) { |
@@ -61,6 +61,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
import isEqual from 'lodash.isequal'; | ||
import isEqual from 'fast-deep-equal/es6/index'; | ||
import memoizeOne from 'memoize-one'; | ||
import hash from 'hash.js'; | ||
import { pathToRegexp } from '@qixian.cs/path-to-regexp'; | ||
import sha265 from '../sha265'; | ||
export function stripQueryStringAndHashFromPath(url) { | ||
@@ -81,3 +81,3 @@ return url.split('?')[0].split('#')[0]; | ||
try { | ||
return "/".concat(hash.sha256().update(JSON.stringify(item)).digest('hex')); | ||
return "/".concat(sha265(JSON.stringify(item))); | ||
} catch (error) {// dom some thing | ||
@@ -84,0 +84,0 @@ } |
@@ -9,10 +9,10 @@ "use strict"; | ||
var _lodash = _interopRequireDefault(require("lodash.isequal")); | ||
var _index = _interopRequireDefault(require("fast-deep-equal/es6/index")); | ||
var _memoizeOne = _interopRequireDefault(require("memoize-one")); | ||
var _hash = _interopRequireDefault(require("hash.js")); | ||
var _pathToRegexp = require("@qixian.cs/path-to-regexp"); | ||
var _sha = _interopRequireDefault(require("../sha265")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -100,3 +100,3 @@ | ||
try { | ||
return "/".concat(_hash.default.sha256().update(JSON.stringify(item)).digest('hex')); | ||
return "/".concat((0, _sha.default)(JSON.stringify(item))); | ||
} catch (error) {// dom some thing | ||
@@ -319,3 +319,3 @@ } | ||
var memoizeOneFormatter = (0, _memoizeOne.default)(formatter, _lodash.default); | ||
var memoizeOneFormatter = (0, _memoizeOne.default)(formatter, _index.default); | ||
/** | ||
@@ -426,3 +426,3 @@ * 删除 hideInMenu 和 item.name 不存在的 | ||
var memoizeOneGetBreadcrumbNameMap = (0, _memoizeOne.default)(getBreadcrumbNameMap, _lodash.default); | ||
var memoizeOneGetBreadcrumbNameMap = (0, _memoizeOne.default)(getBreadcrumbNameMap, _index.default); | ||
@@ -429,0 +429,0 @@ var clearChildren = function clearChildren() { |
{ | ||
"name": "@umijs/route-utils", | ||
"version": "1.0.34", | ||
"version": "1.0.35", | ||
"description": "Quickly process the routing of umi", | ||
@@ -30,3 +30,2 @@ "main": "lib/index.js", | ||
"@types/jest": "^25.2.1", | ||
"@types/lodash.isequal": "^4.5.5", | ||
"@umijs/fabric": "^2.0.8", | ||
@@ -43,3 +42,3 @@ "eslint": "^7.0.0", | ||
"@qixian.cs/path-to-regexp": "^6.1.0", | ||
"hash.js": "^1.1.7", | ||
"fast-deep-equal": "^3.1.3", | ||
"lodash.isequal": "^4.5.0", | ||
@@ -46,0 +45,0 @@ "memoize-one": "^5.1.1" |
@@ -20,3 +20,3 @@ ![](https://codecov.io/gh/umijs/route-utils/branch/master/graph/badge.svg) [![npm package](https://img.shields.io/npm/v/@umijs/route-utils.svg?style=flat-square?style=flat-square)](https://www.npmjs.com/package/@umijs/route-utils) | ||
getMatchMenu, | ||
} from ' @umijs/route-utils'; | ||
} from '@umijs/route-utils'; | ||
@@ -23,0 +23,0 @@ const routes = [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118177
8
33
2234
+ Addedfast-deep-equal@^3.1.3
+ Addedfast-deep-equal@3.1.3(transitive)
- Removedhash.js@^1.1.7
- Removedhash.js@1.1.7(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimalistic-assert@1.0.1(transitive)