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

yog-view

Package Overview
Dependencies
Maintainers
4
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-view - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

24

index.js

@@ -32,19 +32,21 @@ 'use strict';

var prototols = layer(res, settings);
var preFetch = [];
if (prototols.bigpipe && prototols.bigpipe.isQuicklingMode() === false) {
// 准备页面数据
preFetch.push(prototols.bigpipe.preparePageOnly().then(function (data) {
// 页面数据应与locals合并
if (data) {
_.mixin(locals, data);
}
}));
}
if (prototols.bigpipe && prototols.bigpipe.isSpiderMode) {
// 获取所有异步pagelet信息
prototols.bigpipe.prepareAllSources().then(function (data) {
render();
}).catch(function (err) {
// prepareAllSources 不会因为数据准备异常而触发异常,而是错误的 bind 才会引发异常,比如没有返回一个 Promise
done(err);
});
preFetch.push(prototols.bigpipe.prepareAllSources());
}
else {
render();
}
Promise.all(preFetch).then(render).catch(done);
function render() {
var sentData = false;
me.engine.makeStream(filepath, _.mixin(locals, {

@@ -51,0 +53,0 @@ _yog: prototols

{
"name": "yog-view",
"version": "0.6.0",
"version": "0.7.0",
"description": "An express.js middleware for optimizing the order of js\\css output, and enabling render template in bigpipe mode.",

@@ -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