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

route-node

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

route-node - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/amd/route-node.js

@@ -74,3 +74,3 @@ define(['exports', 'module', 'path-parser'], function (exports, module, _pathParser) {

if (!b.parser.hasUrlParams && a.parser.hasUrlParams) return 1;
return 0;
return a.path && b.path ? a.path.length < b.path.length : 0;
});

@@ -77,0 +77,0 @@ } else {

@@ -79,3 +79,3 @@ 'use strict';

if (!b.parser.hasUrlParams && a.parser.hasUrlParams) return 1;
return 0;
return a.path && b.path ? a.path.length < b.path.length : 0;
});

@@ -82,0 +82,0 @@ } else {

@@ -86,3 +86,3 @@ (function (global, factory) {

if (!b.parser.hasUrlParams && a.parser.hasUrlParams) return 1;
return 0;
return a.path && b.path ? a.path.length < b.path.length : 0;
});

@@ -89,0 +89,0 @@ } else {

@@ -49,3 +49,3 @@ import Path from 'path-parser/modules/Path'

if (!b.parser.hasUrlParams && a.parser.hasUrlParams) return 1
return 0;
return a.path && b.path ? a.path.length < b.path.length : 0;
})

@@ -52,0 +52,0 @@ } else {

{
"name": "route-node",
"version": "0.1.2",
"version": "0.1.3",
"description": "A package to create a tree of named routes#",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/route-node.js",

@@ -153,2 +153,13 @@ 'use strict';

});
it('should sort paths by length', function () {
var rootNode = new RouteNode('', '')
.addNode('index', '/')
.addNode('abo', '/abo')
.addNode('about', '/about');
rootNode.matchPath('/').should.eql({name: 'index', params: {}});
rootNode.matchPath('/abo').should.eql({name: 'abo', params: {}});
rootNode.matchPath('/about').should.eql({name: 'about', params: {}});
});
});

@@ -155,0 +166,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