Socket
Socket
Sign inDemoInstall

find-my-way

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-my-way - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

node.js

@@ -27,3 +27,3 @@ 'use strict'

var child = this.children[i]
if (child.label === label && child.kind === kind && child.map) {
if (child.label === label && child.kind === kind && (child.map || child.children.length)) {
return child

@@ -48,3 +48,3 @@ }

var child = this.children[i]
if (child.kind === kind && child.map) {
if (child.kind === kind && (child.map || child.children.length)) {
return child

@@ -51,0 +51,0 @@ }

{
"name": "find-my-way",
"version": "1.0.0",
"version": "1.0.1",
"description": "Crazy fast http radix based router",

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

@@ -175,2 +175,28 @@ 'use strict'

test('common prefix', t => {
t.plan(4)
const findMyWay = FindMyWay()
findMyWay.on('GET', '/f', (req, res, params) => {
t.ok('inside route')
})
findMyWay.on('GET', '/ff', (req, res, params) => {
t.ok('inside route')
})
findMyWay.on('GET', '/ffa', (req, res, params) => {
t.ok('inside route')
})
findMyWay.on('GET', '/ffb', (req, res, params) => {
t.ok('inside route')
})
findMyWay.lookup({ method: 'GET', url: '/f' }, null)
findMyWay.lookup({ method: 'GET', url: '/ff' }, null)
findMyWay.lookup({ method: 'GET', url: '/ffa' }, null)
findMyWay.lookup({ method: 'GET', url: '/ffb' }, null)
})
test('wildcard', t => {

@@ -177,0 +203,0 @@ t.plan(1)

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