hoverintent
Advanced tools
Comparing version 2.0.0 to 2.1.0
# Changelog | ||
## 2.1.0 | ||
- Removed `xtend` dependency [#24](https://github.com/tristen/hoverintent/pull/24). | ||
## 2.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.hoverintent=e()}}(function(){return function e(t,n,o){function r(u,f){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!f&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[u]={exports:{}};t[u][0].call(a.exports,function(e){var n=t[u][1][e];return r(n||e)},a,a.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(e,t,n){"use strict";var o=e("xtend");t.exports=function(e,t,n){function r(e,t){return p&&(p=clearTimeout(p)),d=0,n.call(e,t)}function i(e){c=e.clientX,a=e.clientY}function u(e,n){if(p&&(p=clearTimeout(p)),Math.abs(v-c)+Math.abs(l-a)<y.sensitivity)return d=1,t.call(e,n);v=c,l=a,p=setTimeout(function(){u(e,n)},y.interval)}function f(t){return p&&(p=clearTimeout(p)),e.removeEventListener("mousemove",i,!1),1!==d&&(v=t.clientX,l=t.clientY,e.addEventListener("mousemove",i,!1),p=setTimeout(function(){u(e,t)},y.interval)),this}function s(t){return p&&(p=clearTimeout(p)),e.removeEventListener("mousemove",i,!1),1===d&&(p=setTimeout(function(){r(e,t)},y.timeout)),this}var c,a,v,l,m={},d=0,p=0,y={sensitivity:7,interval:100,timeout:0};return m.options=function(e){return y=o({},y,e),m},m.remove=function(){e&&(e.removeEventListener("mouseover",f,!1),e.removeEventListener("mouseout",s,!1))},e&&(e.addEventListener("mouseover",f,!1),e.addEventListener("mouseout",s,!1)),m}},{xtend:2}],2:[function(e,t,n){function o(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e}t.exports=o;var r=Object.prototype.hasOwnProperty},{}]},{},[1])(1)}); | ||
!function(e,t){if("function"==typeof define&&define.amd)define("hoverintent",["module"],t);else if("undefined"!=typeof exports)t(module);else{var n={exports:{}};t(n),e.hoverintent=n.exports}}(this,function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};e.exports=function(e,n,i){function o(e,t){return p&&(p=clearTimeout(p)),d=0,i.call(e,t)}function r(e){c=e.clientX,m=e.clientY}function u(e,t){if(p&&(p=clearTimeout(p)),Math.abs(a-c)+Math.abs(f-m)<h.sensitivity)return d=1,n.call(e,t);a=c,f=m,p=setTimeout(function(){u(e,t)},h.interval)}function s(t){return p&&(p=clearTimeout(p)),e.removeEventListener("mousemove",r,!1),1!==d&&(a=t.clientX,f=t.clientY,e.addEventListener("mousemove",r,!1),p=setTimeout(function(){u(e,t)},h.interval)),this}function v(t){return p&&(p=clearTimeout(p)),e.removeEventListener("mousemove",r,!1),1===d&&(p=setTimeout(function(){o(e,t)},h.timeout)),this}var c,m,a,f,l={},d=0,p=0,h={sensitivity:7,interval:100,timeout:0};return l.options=function(e){return h=t({},h,e),l},l.remove=function(){e&&(e.removeEventListener("mouseover",s,!1),e.removeEventListener("mouseout",v,!1))},e&&(e.addEventListener("mouseover",s,!1),e.addEventListener("mouseout",v,!1)),l}}); |
'use strict'; | ||
var extend = require('xtend'); | ||
module.exports = function(el, onOver, onOut) { | ||
@@ -44,3 +42,3 @@ var x, y, pX, pY; | ||
h.options = function(opt) { | ||
options = extend({}, options, opt); | ||
options = Object.assign({}, options, opt); | ||
return h; | ||
@@ -47,0 +45,0 @@ }; |
{ | ||
"name": "hoverintent", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"repository": "git@github.com:tristen/hoverintent.git", | ||
@@ -8,3 +8,3 @@ "description": "Fire mouse events when the user intends it", | ||
"scripts": { | ||
"build": "browserify index.js -s hoverintent | uglifyjs -mc > dist/hoverintent.min.js" | ||
"build": "babel index.js | uglifyjs -mc > dist/hoverintent.min.js" | ||
}, | ||
@@ -20,8 +20,7 @@ "author": "tristen", | ||
"devDependencies": { | ||
"browserify": "^12.0.1", | ||
"babel-cli": "^6.26.0", | ||
"babel-plugin-transform-es2015-modules-umd": "^6.24.1", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"uglify-js": "^2.6.1" | ||
}, | ||
"dependencies": { | ||
"xtend": "^4.0.1" | ||
} | ||
} |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
0
0
0
13915
4
202
- Removedxtend@^4.0.1
- Removedxtend@4.0.2(transitive)