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

sponlax

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sponlax - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

dist/index.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.sponlax=e()}(this,function(){"use strict";var t=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n=function(t){var e=void 0,n=function(){if(null===e||void 0===e){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];e=requestAnimationFrame(function(n,r){return function(){e=null,t.apply(n,r)}}(this,r))}};return n.cancel=function(){return cancelAnimationFrame(e)},n},r=function(){var r=this;this.defaults={rootMargin:"0px",threshold:0,shouldUnObserve:function(){return!1},onEnter:function(){},onLeave:function(){},inview:function(){}},this.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-inview]",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.options=e({},r.defaults,n);var o="string"==typeof t?document.querySelectorAll(t):t,i=r.options,a=i.rootMargin,s=i.threshold;r.observer=new IntersectionObserver(r.onIntersection(),{rootMargin:a,threshold:s}),r.nodes=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(o)).map(function(t,e){return t.setAttribute("data-sponlax-key",e),r.observer.observe(t),t}),r.elements={}},this.prevFrame=-1,this.within=function(t){return"true"===t.getAttribute("data-inview")},this.disconnect=function(){r.observer&&(r.observer.disconnect(),r.throttled&&r.throttled.cancel())},this.isRunning=!1,this.loop=function(){var e=window.pageYOffset;if(e!==r.prevFrame){r.isRunning=!0;var n=r.prevFrame>e?"up":"down";r.prevFrame=e;var o=r.options.inview;Object.entries(r.elements).forEach(function(r){var i=t(r,2)[1];o(i,n,e)}),r.throttled()}else r.throttled()},this.intersectNode=function(t){var e=r.options,n=e.shouldUnObserve,o=e.onEnter,i=e.onLeave,a=t.target,s=t.isIntersecting,u=a.dataset,l=u.sponlaxKey,c=u.sponTrack;a._props=t,s?(n(a)&&r.observer.unobserve(a),c&&(r.elements[l]=a),o(a),!r.within(a)&&a.setAttribute("data-inview","true")):(r.within(a)&&a.setAttribute("data-inview","false"),i(a),c&&delete r.elements[l])},this.onIntersection=function(){return function(t){if(t.forEach(r.intersectNode),!1===r.isRunning){Object.keys(r.elements).length>0?(r.throttled=r.throttled||n(r.loop),r.throttled(),r.isRunning=!0):r.throttled&&(r.throttled.cancel(),r.throttled=null,r.isRunning=!1)}}}};return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-inview]",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.call(this),this.update(e,n)}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.sponlax=e()}(this,function(){"use strict";function t(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t){var e=void 0,n=function(n,r){return function(){e=null,t.apply(n,r)}},r=function(){if(null===e||void 0===e){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];e=requestAnimationFrame(n(this,r))}};return r.cancel=function(){return cancelAnimationFrame(e)},r},i=function(){var e=this;this.defaults={rootMargin:"0px",threshold:0,shouldUnObserve:function(){return!1},onEnter:function(){},onLeave:function(){},inview:function(){}},this.update=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-inview]",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.options=r({},e.defaults,o);var i="string"==typeof n?document.querySelectorAll(n):n,a=e.options,s=a.rootMargin,u=a.threshold;e.observer=new IntersectionObserver(e.onIntersection(),{rootMargin:s,threshold:u}),e.nodes=[].concat(t(i)).map(function(t,n){return t.setAttribute("data-sponlax-key",n),e.observer.observe(t),t}),e.elements={}},this.prevFrame=-1,this.within=function(t){return"true"===t.getAttribute("data-inview")},this.disconnect=function(){e.observer&&(e.observer.disconnect(),e.throttled&&e.throttled.cancel())},this.isRunning=!1,this.loop=function(){var t=window.pageYOffset;if(t!==e.prevFrame){e.isRunning=!0;var r=e.prevFrame>t?"up":"down";e.prevFrame=t;var o=e.options.inview;Object.entries(e.elements).forEach(function(e){var i=n(e,2)[1];o(i,r,t)}),e.throttled()}else e.throttled()},this.intersectNode=function(t){var n=e.options,r=n.shouldUnObserve,o=n.onEnter,i=n.onLeave,a=t.target,s=t.isIntersecting,u=a.getAttribute("data-spon-key"),c=a.getAttribute("data-spon-track");a._props=t,s?(r(a)&&e.observer.unobserve(a),c&&(e.elements[u]=a),o(a),!e.within(a)&&a.setAttribute("data-inview","true")):(e.within(a)&&a.setAttribute("data-inview","false"),i(a),c&&delete e.elements[u])},this.onIntersection=function(){return function(t){t.forEach(e.intersectNode),!1===e.isRunning&&(Object.keys(e.elements).length>0?(e.throttled=e.throttled||o(e.loop),e.throttled(),e.isRunning=!0):e.throttled&&(e.throttled.cancel(),e.throttled=null,e.isRunning=!1))}}};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-inview]",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(this,t),i.call(this),this.update(n,r)}});
{
"name": "sponlax",
"version": "2.0.1",
"version": "2.0.2",
"main": "dist/index.min.js",

@@ -5,0 +5,0 @@ "devDependencies": {

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