@invision-www/smooth-scroll
Advanced tools
Comparing version 1.0.4 to 1.0.8-y.0
@@ -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'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1660
27
3
1