{"id":17201937,"url":"https://github.com/atanas-dev/vue-router-multiguard","last_synced_at":"2025-04-13T21:10:28.996Z","repository":{"id":65412461,"uuid":"102948591","full_name":"atanas-dev/vue-router-multiguard","owner":"atanas-dev","description":"Provides the ability to specify multiple guards for vue routes","archived":false,"fork":false,"pushed_at":"2020-05-02T21:54:18.000Z","size":13,"stargazers_count":88,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T11:37:53.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atanas-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-09T10:55:35.000Z","updated_at":"2024-08-10T05:18:22.000Z","dependencies_parsed_at":"2023-01-22T08:05:43.003Z","dependency_job_id":null,"html_url":"https://github.com/atanas-dev/vue-router-multiguard","commit_stats":null,"previous_names":["atanas-angelov-dev/vue-router-multiguard"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanas-dev%2Fvue-router-multiguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanas-dev%2Fvue-router-multiguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanas-dev%2Fvue-router-multiguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanas-dev%2Fvue-router-multiguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atanas-dev","download_url":"https://codeload.github.com/atanas-dev/vue-router-multiguard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782261,"owners_count":21160717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T02:13:08.297Z","updated_at":"2025-04-13T21:10:28.945Z","avatar_url":"https://github.com/atanas-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue Router Multiguard [![Build Status](https://travis-ci.org/atanas-dev/vue-router-multiguard.svg?branch=master)](https://travis-ci.org/atanas-dev/vue-router-multiguard)\n\nProvides the ability to specify multiple guards for vue router routes.\n\n## Installing\n\n`npm install vue-router-multiguard`\n\n## Notes\n\n- Guards are executed serially in the order they are supplied, respecting asynchronous ones.\n- Guard execution will stop when all passed guards are executed OR when any guard calls `next()` with an argument other than `undefined`.\n- When a guard calls `next()` with an argument other than `undefined`, that argument will be passed to VueRouter.\n\n## Usage\n\n`multiguard(function[] guards)` -\u003e `function(to, from, next) {... }`\n\n```js\nimport VueRouter from 'vue-router';\nimport multiguard from 'vue-router-multiguard';\n\nconst guard1 = function(to, from, next) {\n    setTimeout(function() {\n        console.log('guard1 called');\n        next();\n    }, 1000);\n}\n\nconst guard2 = function(to, from, next) {\n    setTimeout(function() {\n        console.log('guard2 called');\n        next();\n    }, 1000);\n}\n\nconst router = new VueRouter({\n    routes: [\n        {\n            name: 'home',\n            path: '/',\n            component: {},\n            beforeEnter: multiguard([guard1, guard2]),\n        }\n    ]\n});\n```\n\n## Running the tests\n\n`npm test`\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatanas-dev%2Fvue-router-multiguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatanas-dev%2Fvue-router-multiguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatanas-dev%2Fvue-router-multiguard/lists"}