Socket
Socket
Sign inDemoInstall

wayfarer

Package Overview
Dependencies
Maintainers
4
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 6.0.1 to 6.0.2

2

package.json
{
"name": "wayfarer",
"version": "6.0.1",
"version": "6.0.2",
"description": "Composable trie based router",

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

@@ -57,19 +57,10 @@ # wayfarer [![stability][0]][1]

### el = router.on(route, cb(params))
### router.on(route, cb(params))
Register a new route. The order in which routes are registered does not matter.
Routes can register multiple callbacks. See
[`routington.define()`](https://github.com/pillarjs/routington#nodes-node--routerdefineroute)
for all route options. When called, the callback is passed a context object and
any additional arguments from `router()`. The context object has the following
properties:
- __route__: the remaining route that wasn't matched
Routes can register multiple callbacks. The callback can return values when
called.
### router(route)
### val = router(route)
Match a route and execute the corresponding callback. Alias: `router.emit()`.
Accepts either a `route` string, or a context object with the following
possible properties:
- __route__: the route to be matched
- __params__: an parameters object
Any arguments passed after the `route/context` are passed as-is into the
function handler.
Returns a values from the matched route (e.g. useful for streams).

@@ -76,0 +67,0 @@ ## Internals

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