Skip to content

Commit

Permalink
chore: v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
troch committed Oct 18, 2015
1 parent db1af75 commit 4da9570
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 80 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
<a name="0.9.1"></a>
## 0.9.1 (2015-10-18)


### Bug Fixes

* don't use array destructuring to avoid the use of Symbol ([db1af75](https://github.com/router5/router5/commit/db1af75))



<a name="0.9.0"></a>
# 0.9.0 (2015-10-17)

Expand Down
37 changes: 10 additions & 27 deletions dist/amd/router5.js
@@ -1,6 +1,6 @@
/**
* @license
* @version 0.9.0
* @version 0.9.1
* The MIT License (MIT)
*
* Copyright (c) 2015 Thomas Roch
Expand Down Expand Up @@ -323,30 +323,20 @@ define('router5', [], function () {

return Path;
})();
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var isSerialisable = function isSerialisable(val) {
return val !== undefined && val !== null && val !== '';
};

var removeQueryParamsFromPath = function removeQueryParamsFromPath(path, params) {
if (path.indexOf('?') === -1) return path;

var _path$split = path.split('?');

var _path$split2 = _slicedToArray(_path$split, 2);

var pathPart = _path$split2[0];
var searchPart = _path$split2[1];
var splitPath = path.split('?');
var pathPart = splitPath[0];
var searchPart = splitPath[1];

var remainingSearchParams = searchPart.split('&').reduce(function (obj, p) {
var _p$split = p.split('=');

var _p$split2 = _slicedToArray(_p$split, 2);

var key = _p$split2[0];
var val = _p$split2[1];

var splitParam = p.split('=');
var key = splitParam[0];
var val = splitParam[1];
if (params.indexOf(key) === -1) obj[key] = val || '';
return obj;
}, {});
Expand Down Expand Up @@ -834,8 +824,6 @@ define('router5', [], function () {

return cancel;
}
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var _slice = Array.prototype.slice;

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Expand Down Expand Up @@ -1482,14 +1470,9 @@ define('router5', [], function () {

if (!pathParts) throw new Error('Could not parse url ' + url);

var _pathParts$slice = pathParts.slice(1);

var _pathParts$slice2 = _slicedToArray(_pathParts$slice, 3);

var pathname = _pathParts$slice2[0];
var hash = _pathParts$slice2[1];
var search = _pathParts$slice2[2];

var pathname = pathParts[1];
var hash = pathParts[2];
var search = pathParts[3];
var opts = this.options;

return (opts.useHash ? hash.replace(new RegExp('^#' + opts.hashPrefix), '') : pathname.replace(new RegExp('^' + opts.base), '')) + (search || '');
Expand Down
4 changes: 2 additions & 2 deletions dist/amd/router5.min.js

Large diffs are not rendered by default.

37 changes: 10 additions & 27 deletions dist/browser/router5.js
@@ -1,6 +1,6 @@
/**
* @license
* @version 0.9.0
* @version 0.9.1
* The MIT License (MIT)
*
* Copyright (c) 2015 Thomas Roch
Expand Down Expand Up @@ -323,30 +323,20 @@

return Path;
})();
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var isSerialisable = function isSerialisable(val) {
return val !== undefined && val !== null && val !== '';
};

var removeQueryParamsFromPath = function removeQueryParamsFromPath(path, params) {
if (path.indexOf('?') === -1) return path;

var _path$split = path.split('?');

var _path$split2 = _slicedToArray(_path$split, 2);

var pathPart = _path$split2[0];
var searchPart = _path$split2[1];
var splitPath = path.split('?');
var pathPart = splitPath[0];
var searchPart = splitPath[1];

var remainingSearchParams = searchPart.split('&').reduce(function (obj, p) {
var _p$split = p.split('=');

var _p$split2 = _slicedToArray(_p$split, 2);

var key = _p$split2[0];
var val = _p$split2[1];

var splitParam = p.split('=');
var key = splitParam[0];
var val = splitParam[1];
if (params.indexOf(key) === -1) obj[key] = val || '';
return obj;
}, {});
Expand Down Expand Up @@ -834,8 +824,6 @@

return cancel;
}
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var _slice = Array.prototype.slice;

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Expand Down Expand Up @@ -1482,14 +1470,9 @@

if (!pathParts) throw new Error('Could not parse url ' + url);

var _pathParts$slice = pathParts.slice(1);

var _pathParts$slice2 = _slicedToArray(_pathParts$slice, 3);

var pathname = _pathParts$slice2[0];
var hash = _pathParts$slice2[1];
var search = _pathParts$slice2[2];

var pathname = pathParts[1];
var hash = pathParts[2];
var search = pathParts[3];
var opts = this.options;

return (opts.useHash ? hash.replace(new RegExp('^#' + opts.hashPrefix), '') : pathname.replace(new RegExp('^' + opts.base), '')) + (search || '');
Expand Down
4 changes: 2 additions & 2 deletions dist/browser/router5.min.js

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions dist/commonjs/router5.js
Expand Up @@ -3,9 +3,6 @@
Object.defineProperty(exports, '__esModule', {
value: true
});

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var _slice = Array.prototype.slice;

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Expand Down Expand Up @@ -668,14 +665,9 @@ var Router5 = (function () {

if (!pathParts) throw new Error('Could not parse url ' + url);

var _pathParts$slice = pathParts.slice(1);

var _pathParts$slice2 = _slicedToArray(_pathParts$slice, 3);

var pathname = _pathParts$slice2[0];
var hash = _pathParts$slice2[1];
var search = _pathParts$slice2[2];

var pathname = pathParts[1];
var hash = pathParts[2];
var search = pathParts[3];
var opts = this.options;

return (opts.useHash ? hash.replace(new RegExp('^#' + opts.hashPrefix), '') : pathname.replace(new RegExp('^' + opts.base), '')) + (search || '');
Expand Down
13 changes: 3 additions & 10 deletions dist/umd/router5.js
Expand Up @@ -13,8 +13,6 @@
})(this, function (exports, module, _routeNode, _transition2, _constants, _browser) {
'use strict';

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var _slice = Array.prototype.slice;

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Expand Down Expand Up @@ -669,14 +667,9 @@

if (!pathParts) throw new Error('Could not parse url ' + url);

var _pathParts$slice = pathParts.slice(1);

var _pathParts$slice2 = _slicedToArray(_pathParts$slice, 3);

var pathname = _pathParts$slice2[0];
var hash = _pathParts$slice2[1];
var search = _pathParts$slice2[2];

var pathname = pathParts[1];
var hash = pathParts[2];
var search = pathParts[3];
var opts = this.options;

return (opts.useHash ? hash.replace(new RegExp('^#' + opts.hashPrefix), '') : pathname.replace(new RegExp('^' + opts.base), '')) + (search || '');
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "router5",
"version": "0.9.0",
"version": "0.9.1",
"description": "An HTML5 router, based on route-node and path-parser",
"main": "dist/commonjs/index.js",
"jsnext:main": "modules/index.js",
Expand Down

0 comments on commit 4da9570

Please sign in to comment.