Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

can-route

Package Overview
Dependencies
Maintainers
3
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-route - npm Package Compare versions

Comparing version 3.0.0-pre.7 to 3.0.0-pre.8

50

can-route.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc