New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rootr

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rootr - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

lib/router.js

@@ -48,3 +48,3 @@ 'use strict';

// console.log('loadContent in router', state, action)
return Object.assign({}, state, { content: action.data });
return Object.assign({}, state, { content: isobject(action.data) && action.data.default ? action.data.default : action.data });
}

@@ -96,3 +96,3 @@

} else if (found && route && route.load) {
// console.log('ASYNC', route)
// console.log('ASYNC', route, content)
// run the action method defined by the router

@@ -99,0 +99,0 @@ content = route.load;

{
"name": "rootr",
"version": "0.1.0",
"version": "0.1.1",
"description": "Router for single page app.",

@@ -5,0 +5,0 @@ "repository": {

@@ -75,3 +75,3 @@ // mock browser globals

//subscribe((state, action) => console.log('action', action))
// subscribe((state, action) => console.log('action', action))
var router= require('./src/index')

@@ -86,6 +86,6 @@ var { location, replaceRoutes, loadContent, loadRoutes, promiseContent } = require('./src/index')

path: '/admin',
load: () => Promise.resolve(testComponent)
load: () => Promise.resolve(testComponent) // Promise resolves to component
}, {
path: '/admin2',
component: testComponent2
load: () => Promise.resolve({ default: testComponent2 }) // Promise resolves to ES6 default.
}, {

@@ -92,0 +92,0 @@ path: '/admin3',

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