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

bigkoa

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigkoa - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

2

package.json
{
"name": "bigkoa",
"version": "0.1.10",
"version": "0.1.11",
"description": "",

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

@@ -26,2 +26,4 @@ 'use strict'

this.json = {}
// 设置 gzip 压缩

@@ -113,9 +115,11 @@ this.gzip = !!options.gzip

*/
writeDataToBrowser (text, isWriteImmediately) {
if (!text) {
throw new Error('Write empty data to Browser.')
}
writeDataToBrowser (pagelet) {
const text = pagelet.view
if (!text) return
// 是否立即写入,如果不立即写入,放到this.cache里
if (!isWriteImmediately || this.modeInstance.isLayoutWriteImmediately === false) {
if (!pagelet.isWriteImmediately || this.modeInstance.isLayoutWriteImmediately === false) {
if (pagelet.domid) {
this.json[pagelet.domid] = pagelet._payload
}
return this.cache.push(text)

@@ -131,10 +135,2 @@ }

this.res.write(text)
// if (this.gzip) {
// this.output.write(text, () => {
// debug(`bigview gzip, text size is: ${text.length}`)
// this.output.flush()
// })
// } else {
// this.res.write(text)
// }
}

@@ -174,4 +170,4 @@ }

// 不生效,某种模式下会有问题
this.emit('bigviewWrite', html, isWriteImmediately)
this.emit('bigviewWrite', { view: html, isWriteImmediately })
}
}

@@ -273,4 +273,3 @@ 'use strict'

if (this.done) {
let err = new Error('bigview.done = true')
return Promise.reject(err)
return Promise.resolve()
}

@@ -277,0 +276,0 @@

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