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

the-killer-router

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

the-killer-router - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

8

lib/router.js

@@ -5,2 +5,6 @@ import Routes from './routes';

constructor() {
this.route = {};
}
reactComponent(reactComponent) {

@@ -23,3 +27,5 @@ this._reactComponent = reactComponent;

navigate(path, data, title) {
this.component = this.evaluteRoute(path);
const {view, config} = this.evaluteRoute(path);
this.component = view;
this.activeRouteConfig = { config, data };
history.pushState(null, title, path);

@@ -26,0 +32,0 @@ this._reactComponent && this._reactComponent.forceUpdate();

6

lib/routes.js
class Routes {
add(path, execution) {
add(path, view, config) {
this[path] = {};
if (!arguments.length) return this;
this[path] = execution;
this[path].view = view;
this[path].config = config;
return this;

@@ -6,0 +8,0 @@ }

{
"name": "the-killer-router",
"version": "0.0.1",
"version": "0.1.0",
"description": "A router library for a view frameworks based",

@@ -5,0 +5,0 @@ "main": "index.js",

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