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

can-route

Package Overview
Dependencies
Maintainers
16
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 5.0.0 to 5.0.1

11

can-route.js
// # can-route.js
// Manage browser history and client state by synchronizing
// Manage browser history and client state by synchronizing
// the window.location.hash with an observable.

@@ -29,3 +29,3 @@

// ## hashchangeObservable
// `hashchangeObservable` is an instance of `Hashchange`, instances of
// `hashchangeObservable` is an instance of `Hashchange`, instances of
// `Hashchange` are two-way bound to `window.location.hash` once the

@@ -350,2 +350,9 @@ // instances have a listener.

set: function(data) {
//!steal-remove-start
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
if (Object.keys(registerRoute.routes).length > 0) {
devLog.warn("can-route: Setting can-route.data after calling can-route.register() may result in unexpected behavior. Set can-route.data before calling can-route.register().");
}
}
//!steal-remove-end
if ( canReflect.isConstructorLike(data) ) {

@@ -352,0 +359,0 @@ data = new data();

4

package.json
{
"name": "can-route",
"version": "5.0.0",
"version": "5.0.1",
"description": "Observable front-end application routing for CanJS.",

@@ -73,3 +73,3 @@ "homepage": "https://canjs.com/doc/can-route.html",

"steal-qunit": "^2.0.0",
"steal-tools": "^1.1.2",
"steal-tools": "^2.0.0",
"test-saucelabs": "0.0.6",

@@ -76,0 +76,0 @@ "testee": "^0.9.0"

@@ -7,2 +7,4 @@ var canRoute = require("can-route");

var mockRoute = require("./mock-route-binding");
var RouteData = require("../src/routedata");
var testHelpers = require("can-test-helpers");

@@ -106,1 +108,10 @@ require("can-observation");

});
testHelpers.dev.devOnlyTest("should warn when .data is set after .register() is called", function (assert) {
var teardown = testHelpers.dev.willWarn(/Set can-route.data before/);
canRoute.register("{page}/{subpage}");
canRoute.data = new RouteData();
assert.equal(teardown(), 1);
});
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