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

deef-router

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deef-router - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

10

lib/index.js

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

var on = function on(_ref) {
var register = function register(_ref) {
var history = _ref.history,

@@ -100,3 +100,3 @@ _ref$compareMatchKeys = _ref.compareMatchKeys,

});
// 先执行onBreakMatch,执行顺序按注册顺序从后到早
// 先执行onBreakMatch,执行顺序按注册顺序从晚到早
[].concat(execList).reverse().forEach(function (item) {

@@ -114,6 +114,8 @@ item.onBreakMatch && item.onBreakMatch();

exports.default = function (_ref3) {
var history = _ref3.history;
var history = _ref3.history,
compareMatchKeys = _ref3.compareMatchKeys;
return {
on: on({ history: history })
on: register({ history: history, compareMatchKeys: compareMatchKeys }),
register: register({ history: history, compareMatchKeys: compareMatchKeys })
};

@@ -120,0 +122,0 @@ };

2

package.json
{
"name": "deef-router",
"version": "0.1.4",
"version": "0.1.5",
"description": "deef router",

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

@@ -14,3 +14,3 @@ /**

const on = ({history, compareMatchKeys = COMPARE_MATCH_KEYS}) => (rule, {onMatch, onBreakMatch}, key) => {
const register = ({history, compareMatchKeys = COMPARE_MATCH_KEYS}) => (rule, {onMatch, onBreakMatch}, key) => {
// 一个rule只生效一次

@@ -75,5 +75,6 @@ let ruleKey = isString(key) && key;

export default ({history}) => {
export default ({history, compareMatchKeys}) => {
return {
on: on({history})
on: register({history, compareMatchKeys}),
register: register({history, compareMatchKeys})
};

@@ -80,0 +81,0 @@ };

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