Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 2, 2016
1 parent 897146a commit a318624
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 90 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-route-recognizer",
"version": "1.0.0-beta.1.1.2",
"version": "1.0.0-beta.1.1.3",
"description": "A lightweight JavaScript library that matches paths against registered routes. It includes support for dynamic and star segments and nested handlers.",
"keywords": [
"aurelia",
Expand Down
34 changes: 6 additions & 28 deletions dist/amd/aurelia-route-recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,9 @@ define(['exports', 'aurelia-path'], function (exports, _aureliaPath) {
}

StaticSegment.prototype.eachChar = function eachChar(callback) {
for (var _iterator2 = this.string, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {

This comment has been minimized.

Copy link
@alvarezmario

alvarezmario Mar 2, 2016

@EisenbergEffect after seeing Babel's generated code, definetely is better to stay away of for..of, so this is for the best

This comment has been minimized.

Copy link
@gheoan

gheoan Mar 2, 2016

Contributor

@alvarezmario What is wrong with the generated code?

This comment has been minimized.

Copy link
@alvarezmario

alvarezmario Mar 2, 2016

@gheoan nothing very important, but the code using for looks nicer and much more concise.

This comment has been minimized.

Copy link
@gheoan

gheoan Mar 3, 2016

Contributor

@alvarezmario the code looks so ugly because aurelia repos are compiled with loose mode on. Details here: https://github.com/babel/babel.github.io/blob/862b43db93e48762671267034a50c30c00e433e2/docs/advanced/loose.md#arrays

This comment has been minimized.

Copy link
@alvarezmario

alvarezmario Mar 3, 2016

@gheoan oh, that's great. Thanks man!

var _ref2;

if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}

var ch = _ref2;

var s = this.string;
for (var i = 0, ii = s.length; i < ii; ++i) {
var ch = s[i];
callback({ validChars: ch });
}
};
Expand Down Expand Up @@ -388,20 +377,9 @@ define(['exports', 'aurelia-path'], function (exports, _aureliaPath) {

var results = [];

for (var _iterator3 = normalizedRoute.split('/'), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;

if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}

var segment = _ref3;

var splitRoute = normalizedRoute.split('/');
for (var i = 0, ii = splitRoute.length; i < ii; ++i) {
var segment = splitRoute[i];
var match = segment.match(/^:([^\/]+)$/);
if (match) {
results.push(new DynamicSegment(match[1]));
Expand Down
8 changes: 6 additions & 2 deletions dist/aurelia-route-recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class StaticSegment {
}

eachChar(callback: (spec: CharSpec) => void): void {
for (let ch of this.string) {
let s = this.string;
for (let i = 0, ii = s.length; i < ii; ++i) {
let ch = s[i];
callback({ validChars: ch });
}
}
Expand Down Expand Up @@ -435,7 +437,9 @@ function parse(route, names, types) {

let results = [];

for (let segment of normalizedRoute.split('/')) {
let splitRoute = normalizedRoute.split('/');
for (let i = 0, ii = splitRoute.length; i < ii; ++i) {
let segment = splitRoute[i];
let match = segment.match(/^:([^\/]+)$/);
if (match) {
results.push(new DynamicSegment(match[1]));
Expand Down
34 changes: 6 additions & 28 deletions dist/commonjs/aurelia-route-recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,9 @@ var StaticSegment = (function () {
}

StaticSegment.prototype.eachChar = function eachChar(callback) {
for (var _iterator2 = this.string, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;

if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}

var ch = _ref2;

var s = this.string;
for (var i = 0, ii = s.length; i < ii; ++i) {
var ch = s[i];
callback({ validChars: ch });
}
};
Expand Down Expand Up @@ -389,20 +378,9 @@ function parse(route, names, types) {

var results = [];

for (var _iterator3 = normalizedRoute.split('/'), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;

if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}

var segment = _ref3;

var splitRoute = normalizedRoute.split('/');
for (var i = 0, ii = splitRoute.length; i < ii; ++i) {
var segment = splitRoute[i];
var match = segment.match(/^:([^\/]+)$/);
if (match) {
results.push(new DynamicSegment(match[1]));
Expand Down
8 changes: 6 additions & 2 deletions dist/es6/aurelia-route-recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class StaticSegment {
}

eachChar(callback: (spec: CharSpec) => void): void {
for (let ch of this.string) {
let s = this.string;
for (let i = 0, ii = s.length; i < ii; ++i) {
let ch = s[i];
callback({ validChars: ch });
}
}
Expand Down Expand Up @@ -435,7 +437,9 @@ function parse(route, names, types) {

let results = [];

for (let segment of normalizedRoute.split('/')) {
let splitRoute = normalizedRoute.split('/');
for (let i = 0, ii = splitRoute.length; i < ii; ++i) {
let segment = splitRoute[i];
let match = segment.match(/^:([^\/]+)$/);
if (match) {
results.push(new DynamicSegment(match[1]));
Expand Down
34 changes: 6 additions & 28 deletions dist/system/aurelia-route-recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,9 @@ System.register(['aurelia-path'], function (_export) {

var results = [];

for (var _iterator3 = normalizedRoute.split('/'), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;

if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}

var segment = _ref3;

var splitRoute = normalizedRoute.split('/');
for (var i = 0, ii = splitRoute.length; i < ii; ++i) {
var segment = splitRoute[i];
var match = segment.match(/^:([^\/]+)$/);
if (match) {
results.push(new DynamicSegment(match[1]));
Expand Down Expand Up @@ -212,20 +201,9 @@ System.register(['aurelia-path'], function (_export) {
}

StaticSegment.prototype.eachChar = function eachChar(callback) {
for (var _iterator2 = this.string, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;

if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}

var ch = _ref2;

var s = this.string;
for (var i = 0, ii = s.length; i < ii; ++i) {
var ch = s[i];
callback({ validChars: ch });
}
};
Expand Down
8 changes: 8 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 1.0.0-beta.1.1.3 (2016-03-02)


#### Bug Fixes

* **for-of:** remove for of loop ([adc9e312](http://github.com/aurelia/route-recognizer/commit/adc9e3122a7499cdde71206ef45026dd14129cbf))


### 1.0.0-beta.1.1.2 (2016-03-01)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-route-recognizer",
"version": "1.0.0-beta.1.1.2",
"version": "1.0.0-beta.1.1.3",
"description": "A lightweight JavaScript library that matches paths against registered routes. It includes support for dynamic and star segments and nested handlers.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit a318624

Please sign in to comment.