Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@bleckert/router
Advanced tools
<0.5kb minified and gzipped
Download dist/module.js or install with npm (npm install @bleckert/router
).
Simply create a new router like this:
const router = new Router();
You can also create the router with a base url (will be prepended on all routes) and/or a routes object.
const router = new Router('/user', {
profile(route, path) {
},
settings(route, path) {
}
});
You can also add routes after init and call dispatch
manually. This is how you add routes:
router.on('/profile', (route, path, event) => {
});
router.on('/splat/*', (route, path, event) => {
});
router.on('/named/:id', (route, path, event) => {
});
router.dispatch();
FAQs
Simple router
We found that @bleckert/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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.