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

ei

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ei - npm Package Compare versions

Comparing version 1.3.7 to 1.3.8

28

lib/App.js

@@ -157,2 +157,3 @@ /**

App.prototype.loadPage = function (page) {
var _this = this;

@@ -175,6 +176,31 @@ if (typeof page === 'function') {

return env.isServer ? this.resolveServerModule(page) : this.resolveClientModule(page);
var loadMethodName = env.isServer ? 'resolveServerModule' : 'resolveClientModule';
return this[loadMethodName](page).then(function (Page) {
return _this.resolvePage(Page);
});
};
/**
* 解析 Page 类
*
* @protected
*
* @param {Object|Function} Page 页面模块
*
* @return {Promise}
*/
App.prototype.resolvePage = function (Page) {
// @hack
// 这种是 commonjs/amd 直接返回的 Page
if (typeof Page === 'function') {
return Page;
}
// 这种是 export default 输出的
return Page['default'];
};
/**
* 服务器端加载Page模块

@@ -181,0 +207,0 @@ *

5

package.json
{
"name": "ei",
"version": "1.3.7",
"version": "1.3.8",
"main": "lib/main.js",

@@ -13,3 +13,4 @@ "scripts": {

"build": "npm test && npm run build:amd && npm run build:commonjs",
"precommit": "npm run lint && npm test"
"precommit": "npm run lint && npm test",
"prepublish": "npm run build"
},

@@ -16,0 +17,0 @@ "author": {

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