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

can-route-pushstate

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-route-pushstate - npm Package Compare versions

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

20

can-route-pushstate.md

@@ -12,3 +12,3 @@ @module {Object} can-route-pushstate

route(":page", { page: "home" });
route("{page}", { page: "home" });
route.ready();

@@ -36,5 +36,5 @@

```js
route(":page", {page: 'homepage'});
route("contacts/:username");
route("books/:genre/:author");
route("{page}", {page: 'homepage'});
route("contacts/{username}");
route("books/{genre}/{author}");

@@ -49,3 +49,3 @@ route.ready(); // Initializes can-route

```js
route.attr(); //-> {page: "homepage", route: ":page"}
route.attr(); //-> {page: "homepage", route: "{page}"}
```

@@ -57,11 +57,11 @@

route.attr('page', 'about');
route.attr(); //-> {page: "about", route: ":page"}
route.attr(); //-> {page: "about", route: "{page}"}
// without cleaning current route state
route.attr('username', 'veljko');
route.attr(); //-> {page: "about", route: ":page", username: 'veljko'}
route.attr(); //-> {page: "about", route: "{page}", username: 'veljko'}
// with cleaning current can-route state
route.attr({username: 'veljko'}, true);
route.attr(); //-> {username: "veljko", route: "contacts/:username"}
route.attr(); //-> {username: "veljko", route: "contacts/{username}"}
```

@@ -73,3 +73,3 @@

route.attr({genre: 'sf', author: 'adams'}, true);
route.attr(); //-> {genre: "sf", author: "adams", route: "books/:genre/:author"}
route.attr(); //-> {genre: "sf", author: "adams", route: "books/{genre}/{author}"}
```

@@ -112,3 +112,3 @@

route.bindings.pushstate.root = "/contacts/"
route(":page");
route("{page}");
route.url({page: "list"}) //-> "/contacts/list"

@@ -115,0 +115,0 @@ route.url({foo: "bar"}) //-> "/contacts/?foo=bar"

{
"name": "can-route-pushstate",
"version": "3.0.0-pre.6",
"version": "3.0.0-pre.7",
"description": "Pushstate for can-route",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com",

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