react-routsy
Advanced tools
Comparing version 1.2.1 to 1.2.2
24
index.js
@@ -14,3 +14,3 @@ var React = require('react'); | ||
var SmallRouter = { | ||
var Routsy = { | ||
// Private, singleton store for all routes | ||
@@ -39,3 +39,3 @@ // TODO: add scope to props of route element? | ||
return path === SmallRouter.currentPath(); | ||
return path === Routsy.currentPath(); | ||
} | ||
@@ -48,3 +48,3 @@ }; | ||
SmallRouter.listeners.forEach(function (fn) { | ||
Routsy.listeners.forEach(function (fn) { | ||
@@ -57,6 +57,6 @@ fn(); | ||
SmallRouter.listeners.push(fn); | ||
Routsy.listeners.push(fn); | ||
} | ||
SmallRouter.Link = createClass({ | ||
Routsy.Link = createClass({ | ||
@@ -98,3 +98,3 @@ propTypes: { | ||
this.setState({ | ||
active: (SmallRouter.currentPath() === this.props.path) | ||
active: Routsy.currentPathMatches(this.props.path) | ||
}); | ||
@@ -106,3 +106,3 @@ }, | ||
e.preventDefault(); | ||
SmallRouter.navigateTo(this.props.path); | ||
Routsy.navigateTo(this.props.path); | ||
this.setActiveClassName(); | ||
@@ -113,3 +113,3 @@ }, | ||
let style = assign( | ||
var style = assign( | ||
{ | ||
@@ -130,3 +130,3 @@ cursor: 'pointer' | ||
SmallRouter.Route = createClass({ | ||
Routsy.Route = createClass({ | ||
@@ -156,3 +156,3 @@ propTypes: { | ||
SmallRouter.routes.push({ | ||
Routsy.routes.push({ | ||
path: this.props.path | ||
@@ -172,3 +172,3 @@ }); | ||
return SmallRouter.currentPath(); | ||
return Routsy.currentPath(); | ||
}, | ||
@@ -240,2 +240,2 @@ | ||
module.exports = SmallRouter; | ||
module.exports = Routsy; |
{ | ||
"name": "react-routsy", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Tiny React component for routing on individual pages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
17472