
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
quilk-frontend-router
Advanced tools
A lightweight router for es6. No dependencies. Works perfectly with jQuery and Vanilla JS
A simple router for your custom js apps. A simple, small and fast router with a tiny production weight of 2kb, also with zero dependencies.
This is your front door in... include the routing module and pass in your routes.
import $ from 'jquery';
import QuilkFrontendRouter from 'quilk-frontend-router';
import routes from './routes';
$(document).ready( () => { new QuilkFrontendRouter( routes ) } );
In this example the routes could look like:
// Import your controllers:
import indexController from './controllers/indexController';
import contactUsController from './controllers/contactUsController';
import sliderController from './controllers/sliderController';
import blogController from './controllers/blogController';
/**
* Example straight key:
* '/this-route-only/'
*
* The above will only match if the pathname is the same as the key, ie:
* '/this-route-only'
* '/this-route-only/'
*
*
* Example key with params:
* '/some-route/(controller-a|controller-b|controller-b/param_a)'
*
* The above will call the array of controller classes provided if the incoming url pathname is any of the following list, but nothing more:
* '/some-route/'
* '/some-route/controller-a'
* '/some-route/controller-b'
* '/some-route/controller-b/param_a'
*
* Exmaple wildcard key:
* '/somepath/*'
*
* The above will call the array of controller classes provided if the incoming url pathname is any of the following list, but nothing more:
* '/some-route/'
* '/some-route/*' basically it matches everything after the key '/somepath'
*
*/
export default {
'/': [ indexController ],
'/contactUsController/(thanks)': [ contactUsController ],
'/blog-posts/*': [ blogController, sliderController ]
};
The controllers just require a construct and you're good to go. Here is what the indexController could look like. This would console log 'This is the index controller' when the url pathname was '/':
export default class indexController {
constructor () {
this.logIt();
}
logIt () {
console.log( `This is the index controller` );
}
}
FAQs
A lightweight router for es6. No dependencies. Works perfectly with jQuery and Vanilla JS
The npm package quilk-frontend-router receives a total of 0 weekly downloads. As such, quilk-frontend-router popularity was classified as not popular.
We found that quilk-frontend-router demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.