can-route
Advanced tools
Comparing version 3.0.0-pre.7 to 3.0.0-pre.8
@@ -393,4 +393,6 @@ /*jshint -W079 */ | ||
* | ||
* canRoute.deparam("id=5&type=videos") | ||
* // -> { id: 5, type: "videos" } | ||
* ```js | ||
* canRoute.deparam("id=5&type=videos") | ||
* // -> { id: 5, type: "videos" } | ||
* ``` | ||
* | ||
@@ -402,7 +404,9 @@ * | ||
* | ||
* canRoute.attr("id", 5) // location.hash -> #!id=5 | ||
* canRoute.attr("type", "videos") | ||
* // location.hash -> #!id=5&type=videos | ||
* canRoute.deparam(location.hash) | ||
* // -> { #!id: 5, type: "videos" } | ||
* ```js | ||
* canRoute.attr("id", 5) // location.hash -> #!id=5 | ||
* canRoute.attr("type", "videos") | ||
* // location.hash -> #!id=5&type=videos | ||
* canRoute.deparam(location.hash) | ||
* // -> { #!id: 5, type: "videos" } | ||
* ``` | ||
* | ||
@@ -412,6 +416,8 @@ * `canRoute.deparam` will try and find a matching route and, if it does, | ||
* | ||
* canRoute(":type/:id") | ||
* ```js | ||
* canRoute(":type/:id") | ||
* | ||
* canRoute.deparam("videos/5"); | ||
* // -> { id: 5, route: ":type/:id", type: "videos" } | ||
* canRoute.deparam("videos/5"); | ||
* // -> { id: 5, route: ":type/:id", type: "videos" } | ||
* ``` | ||
*/ | ||
@@ -520,5 +526,7 @@ deparam: function (url) { | ||
* | ||
* canRoute("overview/:dateStart-:dateEnd"); | ||
* canRoute(":type/:id") | ||
* canRoute.ready() | ||
* ```js | ||
* canRoute("overview/:dateStart-:dateEnd"); | ||
* canRoute(":type/:id") | ||
* canRoute.ready() | ||
* ``` | ||
*/ | ||
@@ -555,4 +563,6 @@ ready: function (val) { | ||
* | ||
* canRoute.url( { type: "videos", id: 5 } ) | ||
* // -> "#!type=videos&id=5" | ||
* ```js | ||
* canRoute.url( { type: "videos", id: 5 } ) | ||
* // -> "#!type=videos&id=5" | ||
* ``` | ||
* | ||
@@ -562,7 +572,9 @@ * If a route matching the provided data is found the URL is built from the data. Any remaining | ||
* | ||
* canRoute(":type/:id") | ||
* ```js | ||
* canRoute(":type/:id") | ||
* | ||
* canRoute.url( { type: "videos", id: 5 } ) // -> "#!videos/5" | ||
* canRoute.url( { type: "video", id: 5, isNew: false } ) | ||
* // -> "#!video/5&isNew=false" | ||
* canRoute.url( { type: "videos", id: 5 } ) // -> "#!videos/5" | ||
* canRoute.url( { type: "video", id: 5, isNew: false } ) | ||
* // -> "#!video/5&isNew=false" | ||
* ``` | ||
*/ | ||
@@ -569,0 +581,0 @@ url: function (options, merge) { |
@@ -7,3 +7,2 @@ @function can-route can-route | ||
@parent can-core | ||
@group can-route.plugins plugins | ||
@link ../docco/route/route.html docco | ||
@@ -10,0 +9,0 @@ |
{ | ||
"name": "can-route", | ||
"version": "3.0.0-pre.7", | ||
"version": "3.0.0-pre.8", | ||
"description": "", | ||
@@ -63,3 +63,3 @@ "homepage": "", | ||
"can-define": "^0.7.7", | ||
"bit-docs": "0.0.6", | ||
"bit-docs": "0.0.7", | ||
"jshint": "^2.9.1", | ||
@@ -66,0 +66,0 @@ "cssify": "^1.0.2", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2408
0
91945