route-node
Advanced tools
Comparing version 1.9.0 to 1.10.0
@@ -0,1 +1,11 @@ | ||
<a name="1.10.0"></a> | ||
# [1.10.0](https://github.com/troch/route-node/compare/v1.9.0...v1.10.0) (2017-10-15) | ||
### Bug Fixes | ||
* strip content of regexes from path before sorting ([#14](https://github.com/troch/route-node/issues/14)) ([0166747](https://github.com/troch/route-node/commit/0166747)) | ||
<a name="1.9.0"></a> | ||
@@ -2,0 +12,0 @@ # [1.9.0](https://github.com/troch/route-node/compare/v1.8.5...v1.9.0) (2017-10-05) |
@@ -678,4 +678,4 @@ define('RouteNode', function () { 'use strict'; | ||
this.children.sort(function (left, right) { | ||
var leftPath = left.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
// '/' last | ||
@@ -682,0 +682,0 @@ if (leftPath === '/') return 1; |
@@ -163,4 +163,4 @@ 'use strict'; | ||
this.children.sort(function (left, right) { | ||
var leftPath = left.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
// '/' last | ||
@@ -167,0 +167,0 @@ if (leftPath === '/') return 1; |
@@ -682,4 +682,4 @@ (function (global, factory) { | ||
this.children.sort(function (left, right) { | ||
var leftPath = left.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var leftPath = left.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
var rightPath = right.path.replace(/<.*?>/g, '').split('?')[0].replace(/(.+)\/$/, '$1'); | ||
// '/' last | ||
@@ -686,0 +686,0 @@ if (leftPath === '/') return 1; |
@@ -112,4 +112,10 @@ import Path from 'path-parser'; | ||
this.children.sort((left, right) => { | ||
const leftPath = left.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
const rightPath = right.path.split('?')[0].replace(/(.+)\/$/, '$1'); | ||
const leftPath = left.path | ||
.replace(/<.*?>/g, '') | ||
.split('?')[0] | ||
.replace(/(.+)\/$/, '$1'); | ||
const rightPath = right.path | ||
.replace(/<.*?>/g, '') | ||
.split('?')[0] | ||
.replace(/(.+)\/$/, '$1'); | ||
// '/' last | ||
@@ -116,0 +122,0 @@ if (leftPath === '/') return 1; |
{ | ||
"name": "route-node", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "A package to create a tree of named routes", | ||
@@ -8,3 +8,3 @@ "main": "dist/commonjs/route-node.js", | ||
"scripts": { | ||
"test": "mocha --compilers js:babel-core/register --recursive 'test/main.js'", | ||
"test": "mocha --compilers js:babel-core/register --recursive \"test/main.js\"", | ||
"test:cover": "babel-node node_modules/.bin/isparta cover node_modules/.bin/_mocha -- --recursive 'test/main.js'", | ||
@@ -11,0 +11,0 @@ "lint": "eslint modules/*.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248998
2507