Socket
Socket
Sign inDemoInstall

create-app

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-app - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

19

lib/server/createApp.js

@@ -9,2 +9,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /**

@@ -63,7 +65,12 @@ * createApp at server

function render(requestPath, callback) {
function render(requestPath, injectContext, callback) {
var result = null;
if (typeof injectContext === 'function') {
callback = injectContext;
injectContext = null;
}
try {
result = initController(fetchController(requestPath));
result = initController(fetchController(requestPath, injectContext));
} catch (error) {

@@ -101,3 +108,3 @@ callback && callback(error);

function fetchController(requestPath) {
function fetchController(requestPath, injectContext) {
var location = history.createLocation(requestPath);

@@ -131,6 +138,8 @@ var matches = matcher(location.pathname);

var finalContext = _extends({}, context, injectContext);
if (_.isThenable(Controller)) {
return Controller.then(function (Controller) {
var Wrapper = wrapController(location.pattern, Controller);
return new Wrapper(location, context);
return new Wrapper(location, finalContext);
});

@@ -140,3 +149,3 @@ }

var Wrapper = wrapController(location.pattern, Controller);
return new Wrapper(location, context);
return new Wrapper(location, finalContext);
}

@@ -143,0 +152,0 @@

{
"name": "create-app",
"version": "0.1.4",
"version": "0.1.5",
"description": "configuring once, rendering both client and server.",

@@ -5,0 +5,0 @@ "browser": "lib/client/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