Socket
Socket
Sign inDemoInstall

wayfarer

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wayfarer - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

7

index.js

@@ -30,3 +30,4 @@ const routington = require('routington')

const node = cb[sym] ? mounts.define(path)[0] : router.define(path)[0]
node.cb = cb
if (Array.isArray(node.cb)) node.cb.push(cb)
else node.cb = [cb]
return emit

@@ -49,3 +50,5 @@ }

// only nested routers need a path
sub ? match.node.cb(path, params) : match.node.cb(params)
match.node.cb.forEach(function (cb) {
sub ? cb(path, params) : cb(params)
})
}

@@ -52,0 +55,0 @@

{
"name": "wayfarer",
"version": "4.0.2",
"version": "4.1.0",
"description": "Composable trie based router",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,3 +54,4 @@ # wayfarer

Register a new route. The order in which routes are registered does not matter.
See [`routington.define()`](https://github.com/pillarjs/routington#nodes-node--routerdefineroute)
Multiple callbacks can be registered. See
[`routington.define()`](https://github.com/pillarjs/routington#nodes-node--routerdefineroute)
for all route options.

@@ -57,0 +58,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc