Vue Router Multiguard
Provides the ability to specify multiple guards for vue router routes.
Installing
npm install vue-router-multiguard
Notes
- Guards are executed serially in the order they are supplied.
- Guard execution will stop when all passed guards are executed OR when any guard calls
next()
with an argument other thanundefined
. - When a guard calls
next()
with an argument other thanundefined
, that argument will be passed to VueRouter.
Usage
multiguard(function[] guards)
-> function(to, from, next) {... }
;; const guard1 = { console; ;} const guard2 = { console; ;} const router = routes: name: 'home' path: '/' component: {} beforeEnter: ;
Running the tests
npm test
License
This project is licensed under the MIT License - see the LICENSE file for details