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

viewprt

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viewprt - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

dist/viewprt.js

@@ -60,5 +60,7 @@ (function (global, factory) {

function toggleEventListeners(handler, container, add) {
var method = add ? 'addEventListener' : 'removeEventListener';
win[method]('resize', handler);
container[method]('scroll', handler);
if (win) {
var method = add ? 'addEventListener' : 'removeEventListener';
win[method]('resize', handler);
container[method]('scroll', handler);
}
}

@@ -82,2 +84,3 @@

}
return this;
};

@@ -84,0 +87,0 @@

@@ -18,5 +18,7 @@ const win = typeof window !== 'undefined' && window

function toggleEventListeners (handler, container, add) {
const method = add ? 'addEventListener' : 'removeEventListener'
win[method]('resize', handler)
container[method]('scroll', handler)
if (win) {
const method = add ? 'addEventListener' : 'removeEventListener'
win[method]('resize', handler)
container[method]('scroll', handler)
}
}

@@ -37,2 +39,3 @@

}
return this
}

@@ -39,0 +42,0 @@

{
"name": "viewprt",
"version": "0.1.0",
"version": "0.1.1",
"description": "viewport observation tool",

@@ -5,0 +5,0 @@ "author": "Garth Poitras <garth22@gmail.com>",

@@ -31,2 +31,7 @@ import assert from 'assert'

})
it('returns instance when calling start()', () => {
let obsrvr = new ViewportObserver().start()
assert.ok(obsrvr instanceof ViewportObserver)
})
})
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