backbone.base-router
Advanced tools
Comparing version 0.4.1 to 0.5.0
{ | ||
"name": "backbone.base-router", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"homepage": "https://github.com/jmeas/backbone.base-router", | ||
@@ -30,5 +30,5 @@ "authors": [ | ||
"dependencies": { | ||
"backbone": "1.0.0 - 1.1.2", | ||
"underscore": "1.4.4 - 1.6.0" | ||
"backbone": "1.1.1 - 1.1.2", | ||
"underscore": "1.4.4 - 1.7.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
// Backbone.BaseRouter v0.4.1 | ||
// Backbone.BaseRouter v0.5.0 | ||
(function(root, factory) { | ||
@@ -42,3 +42,3 @@ if (typeof define === 'function' && define.amd) { | ||
route = origRoute; | ||
routeStr = origRoute.toString(); | ||
routeStr = '' + origRoute; | ||
} else { | ||
@@ -45,0 +45,0 @@ route = this._routeToRegExp(origRoute); |
@@ -1,4 +0,4 @@ | ||
// Backbone.BaseRouter v0.4.1 | ||
// Backbone.BaseRouter v0.5.0 | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=/(\(\?)?:\w+/g;return a.BaseRouter=a.Router.extend({constructor:function(){this.routeParams={},a.Router.prototype.constructor.apply(this,arguments)},onNavigate:function(){},route:function(c,d){var e,f;b.isRegExp(c)?(e=c,f=c.toString()):(e=this._routeToRegExp(c),f=c),this.routeParams[c]=this._extractRouteParams(f);var g={route:e,router:this,linked:d};b.isRegExp(c)||(g.originalRoute=c);var h=this;return a.history.route(e,function(a,b){var c=h._extractParameters(e,a),d=c.pop();b&&(g.navOptions=b),g.query=h._getQueryParameters(d),g.params=h._getNamedParams(f,c),g.uriFragment=a,h.onNavigate(g)}),this},_extractRouteParams:function(a){var b=[];return a.replace(c,function(a){b.push(a.substr(1))}),b},_getQueryParameters:function(a){if(!a)return{};for(var b,c=/([^&=]+)=?([^&]*)/g,d={};b=c.exec(a);)d[this._decodeParams(b[1])]=this._decodeParams(b[2]);return d},_decodeParams:function(a){return decodeURIComponent(a.replace(/\+/g," "))},_getNamedParams:function(a,c){if(!c.length)return{};var d=this.routeParams[a],e=c.slice(0,d.length);return b.object(b.zip(d,e))}}),a.BaseRouter}); | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=/(\(\?)?:\w+/g;return a.BaseRouter=a.Router.extend({constructor:function(){this.routeParams={},a.Router.prototype.constructor.apply(this,arguments)},onNavigate:function(){},route:function(c,d){var e,f;b.isRegExp(c)?(e=c,f=""+c):(e=this._routeToRegExp(c),f=c),this.routeParams[c]=this._extractRouteParams(f);var g={route:e,router:this,linked:d};b.isRegExp(c)||(g.originalRoute=c);var h=this;return a.history.route(e,function(a,b){var c=h._extractParameters(e,a),d=c.pop();b&&(g.navOptions=b),g.query=h._getQueryParameters(d),g.params=h._getNamedParams(f,c),g.uriFragment=a,h.onNavigate(g)}),this},_extractRouteParams:function(a){var b=[];return a.replace(c,function(a){b.push(a.substr(1))}),b},_getQueryParameters:function(a){if(!a)return{};for(var b,c=/([^&=]+)=?([^&]*)/g,d={};b=c.exec(a);)d[this._decodeParams(b[1])]=this._decodeParams(b[2]);return d},_decodeParams:function(a){return decodeURIComponent(a.replace(/\+/g," "))},_getNamedParams:function(a,c){if(!c.length)return{};var d=this.routeParams[a],e=c.slice(0,d.length);return b.object(b.zip(d,e))}}),a.BaseRouter}); | ||
//# sourceMappingURL=backbone.base-router.min.js.map |
{ | ||
"name": "backbone.base-router", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "A better starting point for a new Backbone Router.", | ||
@@ -50,5 +50,5 @@ "main": "dist/backbone.base-router.js", | ||
"dependencies": { | ||
"backbone": "1.0.0 - 1.1.2", | ||
"underscore": "1.4.4 - 1.6.0" | ||
"backbone": "1.1.1 - 1.1.2", | ||
"underscore": "1.4.4 - 1.7.0" | ||
} | ||
} |
@@ -56,3 +56,3 @@ # backbone.base-router | ||
See the [`examples/`](https://github.com/jmeas/backbone.base-router/tree/updates/examples) directory. There are READMEs for each example. | ||
See the [`examples/`](https://github.com/jmeas/backbone.base-router/tree/master/examples) directory. There are READMEs for each example. | ||
@@ -59,0 +59,0 @@ ## API |
@@ -24,3 +24,3 @@ // | ||
route = origRoute; | ||
routeStr = origRoute.toString(); | ||
routeStr = '' + origRoute; | ||
} else { | ||
@@ -27,0 +27,0 @@ route = this._routeToRegExp(origRoute); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
52784
+ Addedunderscore@1.7.0(transitive)
- Removedunderscore@1.6.0(transitive)
Updatedbackbone@1.1.1 - 1.1.2
Updatedunderscore@1.4.4 - 1.7.0