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

vue2-smooth-scroll

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-smooth-scroll - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

History.md

2

dist/vue-smooth-scroll.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueSmoothScroll=t():e.VueSmoothScroll=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){"use strict";function n(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,16)},u={duration:500,offset:0,container:window},f=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t};t.default={install:function(e){e.directive("smooth-scroll",{inserted:function(e,t){if("object"===("undefined"==typeof window?"undefined":i(window))&&void 0!==window.pageYOffset){var o=Object.assign({},u,t.value),c=o.duration,s=o.offset,a=o.container;"string"==typeof a&&(a=document.querySelector(a)),e.addEventListener("click",function(e){e.preventDefault();var t=document.getElementById(this.hash.substring(1));if(t){window.history.pushState&&location.hash!==this.hash&&window.history.pushState("","",this.hash);var o=a.scrollTop||window.pageYOffset,i=f(t,o);i+=s;var u=Date.now();!function e(){var f=Date.now()-u,s=i;f<c?(s=o+(i-o)*n(f/c),r(e)):location.replace("#"+t.id),a===window?a.scrollTo(0,s):a.scrollTop=s}()}})}}})}}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueSmoothScroll=t():e.VueSmoothScroll=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){"use strict";function n(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,16)},u={duration:500,offset:0,container:window},f=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t};t.default={install:function(e){e.directive("smooth-scroll",{inserted:function(e,t){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==window.pageYOffset){var o=t.value,c=o.duration,s=o.offset,a=o.container;c=c||u.duration,s=s||u.offset,a=a||u.container,"string"==typeof a&&(a=document.querySelector(a)),e.addEventListener("click",function(e){e.preventDefault();var t=document.getElementById(this.hash.substring(1));if(t){window.history.pushState&&location.hash!==this.hash&&window.history.pushState("","",this.hash);var o=a.scrollTop||window.pageYOffset,r=f(t,o);r+=s;var u=Date.now();!function e(){var f=Date.now()-u,s=r;f<c?(s=o+(r-o)*n(f/c),i(e)):location.replace("#"+t.id),a===window?a.scrollTo(0,s):a.scrollTop=s}()}})}}})}}}])});
{
"name": "vue2-smooth-scroll",
"version": "1.0.2",
"version": "1.0.3",
"description": "Simple vue smooth scroll",

@@ -5,0 +5,0 @@ "main": "dist/vue-smooth-scroll.min.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