Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wayfarer

Package Overview
Dependencies
Maintainers
1
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 1.1.3 to 1.2.0

32

index.js
/**
* Module dependencies
*/
var router = require('routington');
var assert = require('assert');
/**
* Wayfarer prototype
*/
var wayfarer = Wayfarer.prototype;
/**
* Expose 'router'
*/
module.exports = Wayfarer;
/**

@@ -26,3 +26,3 @@ * Create a new router

*/
function Wayfarer() {

@@ -33,3 +33,3 @@ if (!(this instanceof Wayfarer)) return new Wayfarer();

}
/**

@@ -43,3 +43,3 @@ * Define a new path.

*/
wayfarer.path = function(path, cb) {

@@ -50,3 +50,3 @@ assert('string' == typeof path, 'Path should be a string');

node.cb = cb;
return this;

@@ -69,3 +69,3 @@ }

}
/**

@@ -78,3 +78,3 @@ * Math a route against the paths.

*/
wayfarer.match = function(path) {

@@ -85,2 +85,8 @@ assert('string' == typeof path, 'Path should be a string');

return match.node.cb();
}
}
/**
* Aliases.
*/
wayfarer.route = wayfarer.path;
{
"name": "wayfarer",
"version": "1.1.3",
"version": "1.2.0",
"description": "A simple router built for minimalism and speed",

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

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