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

can-route

Package Overview
Dependencies
Maintainers
9
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.3.1 to 3.3.2

2

package.json
{
"name": "can-route",
"version": "3.3.1",
"version": "3.3.2",
"description": "",

@@ -5,0 +5,0 @@ "homepage": "",

@@ -532,3 +532,3 @@ /* jshint asi:true */

iCanRoute.serializedCompute.bind('change', function(){
equal(iCanRoute.attr('personId'), '3', 'personId');

@@ -1102,3 +1102,3 @@ equal(iCanRoute.attr('foo'), undefined, 'unexpected value');

var AppState = DefineMap.extend({seal: false},{"*": "stringOrObservable"});
var AppState = DefineMap.extend({seal: false},{"*": "stringOrObservable", page: "string", section: "string"});
var appState = new AppState({});

@@ -1114,27 +1114,29 @@

var matchedCount = 0;
canRoute.on('__url', function() {
var onMatchCall = {
1: function section_a() {
canRoute.data.section = 'a';
},
2: function section_b() {
canRoute.data.section = 'b';
},
3: function(){
// 1st call is going from undefined to empty string
equal(matchedCount, 3, 'calls __url event every time a property is changed');
canRoute.off('__url', updateMatchedCount);
mockRoute.stop();
QUnit.start();
}
};
var updateMatchedCount = function() {
// any time a route property is changed, not just the matched route
matchedCount++;
});
onMatchCall[matchedCount]();
};
canRoute.on('__url', updateMatchedCount);
setTimeout(function() {
setTimeout(function page_two() {
canRoute.data.page = 'two';
}, 30);
}, 50);
setTimeout(function() {
canRoute.data.section = 'a';
}, 60);
setTimeout(function() {
canRoute.data.section = 'b';
}, 90);
setTimeout(function(){
// 1st call is going from undefined to empty string
equal(matchedCount, 4, 'calls __url event every time a property is changed');
mockRoute.stop();
QUnit.start();
}, 200);
});
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