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 2.0.2 to 2.0.3

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="2.0.3"></a>
## [2.0.3](https://github.com/troch/route-node/compare/v2.0.2...v2.0.3) (2018-03-05)
* Ensure that order of routes that cannot be disambiguated is preserved ([6b58877](https://github.com/troch/route-node/commit/6b58877))
<a name="2.0.2"></a>

@@ -2,0 +9,0 @@ ## [2.0.2](https://github.com/troch/route-node/compare/v2.0.1...v2.0.2) (2017-11-16)

8

dist/cjs/route-node.js

@@ -618,2 +618,5 @@ 'use strict';

// Push greedy spats to the bottom of the pile
var originalChildren = this.children.slice(0);
this.children.sort(function (left, right) {

@@ -643,4 +646,5 @@ var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1');

if (leftParamLength > rightParamLength) return -1;
// Same last segment length, preserve definition order
return 0;
// Same last segment length, preserve definition order. Note that we
// cannot just return 0, as sort is not guaranteed to be a stable sort.
return originalChildren.indexOf(left) - originalChildren.indexOf(right);
});

@@ -647,0 +651,0 @@ } else {

@@ -616,2 +616,5 @@ // Split path

// Push greedy spats to the bottom of the pile
var originalChildren = this.children.slice(0);
this.children.sort(function (left, right) {

@@ -641,4 +644,5 @@ var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1');

if (leftParamLength > rightParamLength) return -1;
// Same last segment length, preserve definition order
return 0;
// Same last segment length, preserve definition order. Note that we
// cannot just return 0, as sort is not guaranteed to be a stable sort.
return originalChildren.indexOf(left) - originalChildren.indexOf(right);
});

@@ -645,0 +649,0 @@ } else {

@@ -622,2 +622,5 @@ (function (global, factory) {

// Push greedy spats to the bottom of the pile
var originalChildren = this.children.slice(0);
this.children.sort(function (left, right) {

@@ -647,4 +650,5 @@ var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1');

if (leftParamLength > rightParamLength) return -1;
// Same last segment length, preserve definition order
return 0;
// Same last segment length, preserve definition order. Note that we
// cannot just return 0, as sort is not guaranteed to be a stable sort.
return originalChildren.indexOf(left) - originalChildren.indexOf(right);
});

@@ -651,0 +655,0 @@ } else {

@@ -111,2 +111,5 @@ import Path from 'path-parser';

// Push greedy spats to the bottom of the pile
const originalChildren = this.children.slice(0);
this.children.sort((left, right) => {

@@ -142,4 +145,5 @@ const leftPath = left.path

if (leftParamLength > rightParamLength) return -1;
// Same last segment length, preserve definition order
return 0;
// Same last segment length, preserve definition order. Note that we
// cannot just return 0, as sort is not guaranteed to be a stable sort.
return originalChildren.indexOf(left) - originalChildren.indexOf(right);
});

@@ -146,0 +150,0 @@ } else {

{
"name": "route-node",
"version": "2.0.2",
"version": "2.0.3",
"description": "A package to create a tree of named routes",

@@ -5,0 +5,0 @@ "main": "dist/cjs/route-node.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