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

@invision-www/smooth-scroll

Package Overview
Dependencies
Maintainers
8
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invision-www/smooth-scroll - npm Package Compare versions

Comparing version 1.0.4 to 1.0.8-y.0

build-es5/smoothScroll.js

17

build/index.js

@@ -1,15 +0,2 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _smoothScroll;
function _load_smoothScroll() {
return _smoothScroll = _interopRequireDefault(require('smoothScroll'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = (_smoothScroll || _load_smoothScroll()).default;
import smoothScroll from 'smoothScroll';
export default smoothScroll;

@@ -1,22 +0,15 @@

'use strict';
import scrollTo from '@invision-www/scroll-to';
var _scrollTo;
function _load_scrollTo() {
return _scrollTo = _interopRequireDefault(require('@invision-www/scroll-to'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var handleMouseWheel = function handleMouseWheel(e) {
e.preventDefault();
var delta = e.wheelDelta / 120 || -e.detail / 3;
var to = window.scrollY - parseInt(delta * 50, 10);
(0, (_scrollTo || _load_scrollTo()).default)({ to: to, speed: 200 });
e.preventDefault();
var delta = e.wheelDelta / 120 || -e.detail / 3;
var to = window.scrollY - parseInt(delta * 50, 10);
scrollTo({
to: to,
speed: 200
});
};
['mousewheel', 'DOMMouseScroll'].map(function (evt) {
return document.body.addEventListener(evt, handleMouseWheel);
});
['mousewheel', 'DOMMouseScroll'].map(function(evt) {
return document.body.addEventListener(evt, handleMouseWheel);
});
{
"name": "@invision-www/smooth-scroll",
"version": "1.0.4",
"version": "1.0.8-y.0",
"description": "",
"main": "dist/smoothScroll.js",
"browser": "dist/smoothScroll.js",
"main": "build/smoothScroll.js",
"browser": "build-es5/smoothScroll.js",
"scripts": {

@@ -17,4 +17,4 @@ "test": "echo \"Error: no test specified\" && exit 1"

"dependencies": {
"@invision-www/scroll-to": "^1.0.3"
"@invision-www/scroll-to": "^1.0.8-y.0"
}
}
import smoothScroll from 'smoothScroll';
export default smoothScroll;

@@ -0,0 +0,0 @@ import scrollTo from '@invision-www/scroll-to';

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