
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
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.
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.
This is your front door in... include the routing module and pass in your routes/attributes.
import $ from 'jquery';
import QuilkFrontendRouter from 'quilk-frontend-router';
import routes from './routes';
$(document).ready( () => { new QuilkFrontendRouter( routes ) } );
You can also turn on verbose(ish) logging with
$(document).ready( () => { new QuilkFrontendRouter( routes, true ) } );
In this example your routes file could look like:
// Import your controllers, this will be initiated when a match is hit, either via route of html attr:
import indexController from './controllers/indexController';
import contactUsController from './controllers/contactUsController';
import sliderController from './controllers/sliderController';
import blogController from './controllers/blogController';
import GlobalController from './controllers/GlobalController'
import MainNaviController from './controllers/MainNaviController'
import Select2Controller from './controllers/Select2Controller'
/**
*
* ****** URL PATH MATCHING *******
* The router can be used to trigger on url paths and params.
*
* 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'
* ****** HTML ATTRIBUTE MATCHING *******
* The router can now also be used to match on html attributes, eg class or id or bespoke attrs, but see below for examples.
* For the attirbute routing to work you must include jquery to the global window object
*
*/
export default {
'path': {
'*': [ GlobalController ]
'/': [ indexController ],
'/contactUsController/(thanks)': [ contactUsController ],
'/blog-posts/*': [ blogController, sliderController ]
},
'attributes': {
'content-type': {
'artical-container': [articleContainerController],
'article': [articlePageController]
},
'class': {
'mega-navi': [MainNaviController],
'select2': [Select2Controller]
}
}
};
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 2 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
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.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Google’s UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.