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

choo-lazy-view

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

choo-lazy-view - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

17

index.js

@@ -12,2 +12,3 @@ module.exports = lazy

var init = promisify(load)
var promise

@@ -17,10 +18,12 @@ return function proxy (state, emit) {

var p = init().then(function (render) {
// asynchronously render view to account for nested prefetches
if (typeof window === 'undefined') render(state, emit)
proxy.render = render
return render
})
if (!promise) {
promise = init().then(function (render) {
// asynchronously render view to account for nested prefetches
if (typeof window === 'undefined') render(state, emit)
proxy.render = render
return render
})
emit('lazy:load', promise)
}
emit('lazy:load', p)
if (typeof loader === 'function') return loader(state, emit)

@@ -27,0 +30,0 @@

{
"name": "choo-lazy-view",
"version": "1.0.1",
"version": "1.0.2",
"description": "Lazily fetch view when needed",

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