creepyface
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -13,2 +13,3 @@ 'use strict'; | ||
var throttle = _interopDefault(require('throttleit')); | ||
var debounce = _interopDefault(require('debounce')); | ||
@@ -192,2 +193,6 @@ var diff = function diff(v1, v2) { | ||
var parseNumericOption = function parseNumericOption(option) { | ||
return isNaN(option) ? undefined : parseFloat(option); | ||
}; | ||
var getSrcs = function getSrcs(options) { | ||
@@ -207,3 +212,4 @@ var srcs = options.looks.map(function (_ref) { | ||
fieldofvision = _parseDataAttributes.fieldofvision, | ||
throttle$$1 = _parseDataAttributes.throttle; | ||
throttle$$1 = _parseDataAttributes.throttle, | ||
backtonormal = _parseDataAttributes.backtonormal; | ||
@@ -219,3 +225,4 @@ var _ref2 = src || {}, | ||
looks: getLooks(look), | ||
throttle: parseFloat(throttle$$1) | ||
throttle: parseNumericOption(throttle$$1), | ||
backToNormal: parseNumericOption(backtonormal) | ||
}, defaultOptions); | ||
@@ -230,3 +237,4 @@ } | ||
points: combined([mousePoints, fingerPoints]), | ||
throttle: 0 | ||
throttle: 0, | ||
backToNormal: 1000 | ||
}; | ||
@@ -236,6 +244,9 @@ | ||
var options = defaults({}, userOptions, fromElement(img)); | ||
var backToNormal = debounce(function () { | ||
img.src = options.default; | ||
}, options.backToNormal); | ||
return preload(img, getSrcs(options)).then(function () { | ||
return options.points.map(throttle(function (point) { | ||
img.src = pointToSrc(point, img, options); | ||
options.backToNormal > 0 && backToNormal(); | ||
}, options.throttle)); | ||
@@ -242,0 +253,0 @@ }); |
@@ -9,2 +9,3 @@ import getElementCenter from 'get-element-center'; | ||
import throttle from 'throttleit'; | ||
import debounce from 'debounce'; | ||
@@ -188,2 +189,6 @@ var diff = function diff(v1, v2) { | ||
var parseNumericOption = function parseNumericOption(option) { | ||
return isNaN(option) ? undefined : parseFloat(option); | ||
}; | ||
var getSrcs = function getSrcs(options) { | ||
@@ -203,3 +208,4 @@ var srcs = options.looks.map(function (_ref) { | ||
fieldofvision = _parseDataAttributes.fieldofvision, | ||
throttle$$1 = _parseDataAttributes.throttle; | ||
throttle$$1 = _parseDataAttributes.throttle, | ||
backtonormal = _parseDataAttributes.backtonormal; | ||
@@ -215,3 +221,4 @@ var _ref2 = src || {}, | ||
looks: getLooks(look), | ||
throttle: parseFloat(throttle$$1) | ||
throttle: parseNumericOption(throttle$$1), | ||
backToNormal: parseNumericOption(backtonormal) | ||
}, defaultOptions); | ||
@@ -226,3 +233,4 @@ } | ||
points: combined([mousePoints, fingerPoints]), | ||
throttle: 0 | ||
throttle: 0, | ||
backToNormal: 1000 | ||
}; | ||
@@ -232,6 +240,9 @@ | ||
var options = defaults({}, userOptions, fromElement(img)); | ||
var backToNormal = debounce(function () { | ||
img.src = options.default; | ||
}, options.backToNormal); | ||
return preload(img, getSrcs(options)).then(function () { | ||
return options.points.map(throttle(function (point) { | ||
img.src = pointToSrc(point, img, options); | ||
options.backToNormal > 0 && backToNormal(); | ||
}, options.throttle)); | ||
@@ -238,0 +249,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.creepyFace=e()}(this,function(){"use strict";function t(t,e,n){var r=t.coords,o=n.looks,u=n.hover,a=n.fieldOfVision,i=p(y(f(r,E(e)),Math.PI/2)),s=n.default;if(u&&M(e,r))s=u;else{var c=S(i,o);c&&Math.abs(g(c.angle-i))<a/2&&(s=c.src)}return s}function e(t){if(!t)return Promise.reject();if("string"==typeof t){var n=t;(t=new Image).src=n}else{if(void 0!==t.length){var r=[].map.call(t,function(t){return e(t).catch(function(t){return t})});return Promise.all(r).then(function(t){var e=t.filter(function(t){return t.naturalWidth});return e.length===t.length?e:Promise.reject({loaded:e,errored:t.filter(function(t){return!t.naturalWidth})})})}if("IMG"!==t.tagName)return Promise.reject()}var o=new Promise(function(e,n){function r(){t.naturalWidth?e(t):n(t),t.removeEventListener("load",r),t.removeEventListener("error",r)}t.naturalWidth?e(t):t.complete?n(t):(t.addEventListener("load",r),t.addEventListener("error",r))});return o.image=t,o}function n(t){t.forEach(function(t){t.style.position="fixed",t.style.height="0px",document.body.appendChild(t),setTimeout(function(){return document.body.removeChild(t)},1e3)})}function r(t,e){return x(e).then(function(e){t.creepyFaceReachableImages=e,P&&n(e)})}function o(t){return function(e){var n;return n=/^data\-/.test(e.name),void 0===t?n:n&&t.test(e.name.slice(5))}}function u(t,e,n){return{coords:t,target:e,source:n}}function a(t){var e=[],n=function(t){return e.forEach(function(e){var n=e.apply;return e.nexts.forEach(k(n(t)))})};return{map:function(r){0===e.length&&t(n);var o=[];return e.push({apply:r,nexts:o}),a(o.push.bind(o))}}}function i(t,e,n){var r=t.length;return e=null==e?n||0:e<0?Math.max(r+e,0):Math.min(e,r)}function s(t){var e=j(t),n=e.src,r=e.fieldofvision,o=e.throttle,u=n||{},a=u.hover,i=u.look;return Y({fieldOfVision:isNaN(r)||d(parseFloat(r)),default:t.getAttribute("src"),hover:a,looks:q(i),throttle:parseFloat(o)},U)}function c(e,n){var o=Y({},n,s(e));return r(e,G(o)).then(function(){return o.points.map(H(function(n){e.src=t(n,e,o)},o.throttle))})}var f=function(t,e){return t.map(function(t,n){return t-e[n]})},l=function(t,e){return t.map(function(t,n){return t+e[n]})},h=function(t){return t?t<0?-1:1:0},d=function(t){return t*Math.PI/180},m=function(t,e){return(e+t%e)%e},p=function(t){return m(Math.atan2(t[1],t[0]),2*Math.PI)},y=function(t,e){return[t[0]*Math.cos(e)-t[1]*Math.sin(e),t[0]*Math.sin(e)+t[1]*Math.cos(e)]},b=function(t){var e=t.getBoundingClientRect();return{y:e.top+window.pageYOffset+e.height/2,x:e.left+window.pageXOffset+e.width/2}},v=function(){function t(t,e){var n=[],r=!0,o=!1,u=void 0;try{for(var a,i=t[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,u=t}finally{try{!r&&i.return&&i.return()}finally{if(o)throw u}}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")}}(),E=function(t){var e=b(t);return[e.x,e.y]},g=function(t){return Math.abs(t)>Math.PI?t-2*h(t)*Math.PI:t},N=function(t){return function(e,n){return Math.abs(g(e.angle-t))-Math.abs(g(n.angle-t))}},S=function(t,e){return e.slice(0).sort(N(t))[0]},W=function(t,e,n){return t>=e&&t<=n},w=function(t,e){var n=t.left,r=t.top,o=t.right,u=t.bottom,a=v(e,2),i=a[0],s=a[1];return W(i,n,o)&&W(s,r,u)},M=function(t,e){var n=v(e,2),r=n[0],o=n[1];return document.elementFromPoint?document.elementFromPoint(r,o)===t:w(t.getBoundingClientRect(),[r,o])},x=e,P="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),j=function(t,e){var n={};return void 0===(e=e||{}).separator&&(e.separator="-"),Array.prototype.slice.call(t.attributes).filter(o(e.pattern)).forEach(function(t){t.name.slice(5).split(e.separator).reduce(function(e,n,r,o){return"data"===n?e:(r===o.length-1?e[n]=t.value:e[n]=e[n]||{},e[n])},n)}),n},O=("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){!function(e,n){t.exports=n()}(0,function(){var t=[90,45,22.5,11.25],e=[{symbol:"N",name:"North",depth:0},{symbol:"NbE",name:"North by East",depth:3},{symbol:"NNE",name:"North North East",depth:2},{symbol:"NEbN",name:"North East by North",depth:3},{symbol:"NE",name:"North East",depth:1},{symbol:"NEbE",name:"North East by East",depth:3},{symbol:"ENE",name:"East North East",depth:2},{symbol:"EbN",name:"East by North",depth:3},{symbol:"E",name:"East",depth:0},{symbol:"EbS",name:"East by South",depth:3},{symbol:"ESE",name:"East South East",depth:2},{symbol:"SEbE",name:"South East by East",depth:3},{symbol:"SE",name:"South East",depth:1},{symbol:"SEbS",name:"South East by South",depth:3},{symbol:"SSE",name:"South South East",depth:2},{symbol:"SbE",name:"South by East",depth:3},{symbol:"S",name:"South",depth:0},{symbol:"SbW",name:"South by West",depth:3},{symbol:"SSW",name:"South South West",depth:2},{symbol:"SWbS",name:"South West by South",depth:3},{symbol:"SW",name:"South West",depth:1},{symbol:"SWbW",name:"South West by West",depth:3},{symbol:"WSW",name:"West South West",depth:2},{symbol:"WbS",name:"West by South",depth:3},{symbol:"W",name:"West",depth:0},{symbol:"WbN",name:"West by North",depth:3},{symbol:"WNW",name:"West North West",depth:2},{symbol:"NWbW",name:"North West by West",depth:3},{symbol:"NW",name:"North West",depth:1},{symbol:"NWbN",name:"North West by North",depth:3},{symbol:"NNW",name:"North North West",depth:2},{symbol:"NbW",name:"North by West",depth:3}];return{getPoint:function(n,r){if(!(n<0||n>360)){(r=r||{}).depth=r.hasOwnProperty("depth")?r.depth:3;var o=Math.round(n/t[r.depth]),u=e.filter(function(t){return t.depth<=r.depth});return o===u.length&&(o=0),u[o]}},getDegrees:function(n,r){var o,u,a;if(r=r||{},r.depth=r.hasOwnProperty("depth")?r.depth:3,!(r.depth<0||r.depth>3)&&(e.forEach(function(e,r){n!==e.name&&n!==e.symbol||(o=r*t[3])}),u=o-t[r.depth]/2,a=o+t[r.depth]/2,void 0!==o))return{min:u>=0?u:360+u,value:o,max:a<=360?a:a-360}}}})})),k=function(t){return function(e){return e(t)}},I=function(t,e){return a(function(n){return t.addEventListener(e,n,!0)})},A=I(document,"mousemove").map(function(t){return u([t.clientX,t.clientY],t.target,"mouse")}),F=I(document,"touchmove").map(function(t){return u([].slice.call(t.touches).map(function(t){return[t.clientX,t.clientY]}).reduce(l,[0,0]),t.target,"finger")}),C=function(t,e,n){if(null!=t)for(var r=t.length,o=-1;++o<r;){var u=t[o];if(!1===e.call(n,u,o,t))break}},L=function(t,e,n){var r=t.length,o=[];for(e=i(t,e),n=i(t,n,r);e<n;)o.push(t[e++]);return o},D=function(t,e,n){for(var r in t)if(!1===e.call(n,t[r],r,t))break},T=Object.prototype.hasOwnProperty,R=function(t,e,n){D(t,function(r,o){if(T.call(t,o))return e.call(n,t[o],o,t)})},V=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)},X=function(t,e){return null==t?{}:(C(L(arguments,1),function(e){V(e)&&R(e,function(e,n){null==t[n]&&(t[n]=e)})}),t)},Y=X;Y.immutable=function(){var t=L(arguments);return X.apply(null,[{}].concat(t))};var B=function(t){return d(isNaN(t)?O.getDegrees(t.toUpperCase()).value:parseFloat(t))},q=function(t){return Object.keys(t||{}).map(function(e){return{angle:B(e),src:t[e]}})},G=function(t){var e=t.looks.map(function(t){return t.src});return t.default&&e.push(t.default),t.hover&&e.push(t.hover),e},U={fieldOfVision:d(150),default:"",hover:"",looks:[],points:function(t){return a(function(e){return t.map(function(t){return t.map(e)})})}([A,F]),throttle:0},z=function(t){return!(!t||"object"!=typeof t)&&("object"==typeof window&&"object"==typeof window.Node?t instanceof window.Node:"number"==typeof t.nodeType&&"string"==typeof t.nodeName)},H=function(t,e){function n(){a=0,i=+new Date,u=t.apply(r,o),r=null,o=null}var r,o,u,a,i=0;return function(){r=this,o=arguments;var t=new Date-i;return a||(t>=e?n():a=setTimeout(n,e-t)),u}};return function(t){return z(t)?[t]:"string"==typeof t?[].slice.call(document.querySelectorAll(t)):void 0}("img[data-creepy]").forEach(function(t){return c(t)}),c}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.creepyFace=e()}(this,function(){"use strict";function t(t,e,n){var r=t.coords,o=n.looks,u=n.hover,a=n.fieldOfVision,i=p(y(s(r,N(e)),Math.PI/2)),l=n.default;if(u&&M(e,r))l=u;else{var c=S(i,o);c&&Math.abs(E(c.angle-i))<a/2&&(l=c.src)}return l}function e(t){if(!t)return Promise.reject();if("string"==typeof t){var n=t;(t=new Image).src=n}else{if(void 0!==t.length){var r=[].map.call(t,function(t){return e(t).catch(function(t){return t})});return Promise.all(r).then(function(t){var e=t.filter(function(t){return t.naturalWidth});return e.length===t.length?e:Promise.reject({loaded:e,errored:t.filter(function(t){return!t.naturalWidth})})})}if("IMG"!==t.tagName)return Promise.reject()}var o=new Promise(function(e,n){function r(){t.naturalWidth?e(t):n(t),t.removeEventListener("load",r),t.removeEventListener("error",r)}t.naturalWidth?e(t):t.complete?n(t):(t.addEventListener("load",r),t.addEventListener("error",r))});return o.image=t,o}function n(t){t.forEach(function(t){t.style.position="fixed",t.style.height="0px",document.body.appendChild(t),setTimeout(function(){return document.body.removeChild(t)},1e3)})}function r(t,e){return x(e).then(function(e){t.creepyFaceReachableImages=e,P&&n(e)})}function o(t){return function(e){var n;return n=/^data\-/.test(e.name),void 0===t?n:n&&t.test(e.name.slice(5))}}function u(t,e,n){return{coords:t,target:e,source:n}}function a(t){var e=[],n=function(t){return e.forEach(function(e){var n=e.apply;return e.nexts.forEach(O(n(t)))})};return{map:function(r){0===e.length&&t(n);var o=[];return e.push({apply:r,nexts:o}),a(o.push.bind(o))}}}function i(t,e,n){var r=t.length;return e=null==e?n||0:e<0?Math.max(r+e,0):Math.min(e,r)}function l(t){var e=k(t),n=e.src,r=e.fieldofvision,o=e.throttle,u=e.backtonormal,a=n||{},i=a.hover,l=a.look;return Y({fieldOfVision:isNaN(r)||m(parseFloat(r)),default:t.getAttribute("src"),hover:i,looks:q(l),throttle:G(o),backToNormal:G(u)},z)}function c(e,n){var o=Y({},n,l(e)),u=K(function(){e.src=o.default},o.backToNormal);return r(e,U(o)).then(function(){return o.points.map(J(function(n){e.src=t(n,e,o),o.backToNormal>0&&u()},o.throttle))})}var s=function(t,e){return t.map(function(t,n){return t-e[n]})},f=function(t,e){return t.map(function(t,n){return t+e[n]})},h=function(t){return t?t<0?-1:1:0},m=function(t){return t*Math.PI/180},d=function(t,e){return(e+t%e)%e},p=function(t){return d(Math.atan2(t[1],t[0]),2*Math.PI)},y=function(t,e){return[t[0]*Math.cos(e)-t[1]*Math.sin(e),t[0]*Math.sin(e)+t[1]*Math.cos(e)]},b=function(t){var e=t.getBoundingClientRect();return{y:e.top+window.pageYOffset+e.height/2,x:e.left+window.pageXOffset+e.width/2}},v=function(){function t(t,e){var n=[],r=!0,o=!1,u=void 0;try{for(var a,i=t[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,u=t}finally{try{!r&&i.return&&i.return()}finally{if(o)throw u}}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")}}(),N=function(t){var e=b(t);return[e.x,e.y]},E=function(t){return Math.abs(t)>Math.PI?t-2*h(t)*Math.PI:t},g=function(t){return function(e,n){return Math.abs(E(e.angle-t))-Math.abs(E(n.angle-t))}},S=function(t,e){return e.slice(0).sort(g(t))[0]},W=function(t,e,n){return t>=e&&t<=n},w=function(t,e){var n=t.left,r=t.top,o=t.right,u=t.bottom,a=v(e,2),i=a[0],l=a[1];return W(i,n,o)&&W(l,r,u)},M=function(t,e){var n=v(e,2),r=n[0],o=n[1];return document.elementFromPoint?document.elementFromPoint(r,o)===t:w(t.getBoundingClientRect(),[r,o])},x=e,P="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),k=function(t,e){var n={};return void 0===(e=e||{}).separator&&(e.separator="-"),Array.prototype.slice.call(t.attributes).filter(o(e.pattern)).forEach(function(t){t.name.slice(5).split(e.separator).reduce(function(e,n,r,o){return"data"===n?e:(r===o.length-1?e[n]=t.value:e[n]=e[n]||{},e[n])},n)}),n},j=("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){!function(e,n){t.exports=n()}(0,function(){var t=[90,45,22.5,11.25],e=[{symbol:"N",name:"North",depth:0},{symbol:"NbE",name:"North by East",depth:3},{symbol:"NNE",name:"North North East",depth:2},{symbol:"NEbN",name:"North East by North",depth:3},{symbol:"NE",name:"North East",depth:1},{symbol:"NEbE",name:"North East by East",depth:3},{symbol:"ENE",name:"East North East",depth:2},{symbol:"EbN",name:"East by North",depth:3},{symbol:"E",name:"East",depth:0},{symbol:"EbS",name:"East by South",depth:3},{symbol:"ESE",name:"East South East",depth:2},{symbol:"SEbE",name:"South East by East",depth:3},{symbol:"SE",name:"South East",depth:1},{symbol:"SEbS",name:"South East by South",depth:3},{symbol:"SSE",name:"South South East",depth:2},{symbol:"SbE",name:"South by East",depth:3},{symbol:"S",name:"South",depth:0},{symbol:"SbW",name:"South by West",depth:3},{symbol:"SSW",name:"South South West",depth:2},{symbol:"SWbS",name:"South West by South",depth:3},{symbol:"SW",name:"South West",depth:1},{symbol:"SWbW",name:"South West by West",depth:3},{symbol:"WSW",name:"West South West",depth:2},{symbol:"WbS",name:"West by South",depth:3},{symbol:"W",name:"West",depth:0},{symbol:"WbN",name:"West by North",depth:3},{symbol:"WNW",name:"West North West",depth:2},{symbol:"NWbW",name:"North West by West",depth:3},{symbol:"NW",name:"North West",depth:1},{symbol:"NWbN",name:"North West by North",depth:3},{symbol:"NNW",name:"North North West",depth:2},{symbol:"NbW",name:"North by West",depth:3}];return{getPoint:function(n,r){if(!(n<0||n>360)){(r=r||{}).depth=r.hasOwnProperty("depth")?r.depth:3;var o=Math.round(n/t[r.depth]),u=e.filter(function(t){return t.depth<=r.depth});return o===u.length&&(o=0),u[o]}},getDegrees:function(n,r){var o,u,a;if(r=r||{},r.depth=r.hasOwnProperty("depth")?r.depth:3,!(r.depth<0||r.depth>3)&&(e.forEach(function(e,r){n!==e.name&&n!==e.symbol||(o=r*t[3])}),u=o-t[r.depth]/2,a=o+t[r.depth]/2,void 0!==o))return{min:u>=0?u:360+u,value:o,max:a<=360?a:a-360}}}})})),O=function(t){return function(e){return e(t)}},T=function(t,e){return a(function(n){return t.addEventListener(e,n,!0)})},I=T(document,"mousemove").map(function(t){return u([t.clientX,t.clientY],t.target,"mouse")}),A=T(document,"touchmove").map(function(t){return u([].slice.call(t.touches).map(function(t){return[t.clientX,t.clientY]}).reduce(f,[0,0]),t.target,"finger")}),F=function(t,e,n){if(null!=t)for(var r=t.length,o=-1;++o<r;){var u=t[o];if(!1===e.call(n,u,o,t))break}},D=function(t,e,n){var r=t.length,o=[];for(e=i(t,e),n=i(t,n,r);e<n;)o.push(t[e++]);return o},C=function(t,e,n){for(var r in t)if(!1===e.call(n,t[r],r,t))break},L=Object.prototype.hasOwnProperty,R=function(t,e,n){C(t,function(r,o){if(L.call(t,o))return e.call(n,t[o],o,t)})},V=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)},X=function(t,e){return null==t?{}:(F(D(arguments,1),function(e){V(e)&&R(e,function(e,n){null==t[n]&&(t[n]=e)})}),t)},Y=X;Y.immutable=function(){var t=D(arguments);return X.apply(null,[{}].concat(t))};var B=function(t){return m(isNaN(t)?j.getDegrees(t.toUpperCase()).value:parseFloat(t))},q=function(t){return Object.keys(t||{}).map(function(e){return{angle:B(e),src:t[e]}})},G=function(t){return isNaN(t)?void 0:parseFloat(t)},U=function(t){var e=t.looks.map(function(t){return t.src});return t.default&&e.push(t.default),t.hover&&e.push(t.hover),e},z={fieldOfVision:m(150),default:"",hover:"",looks:[],points:function(t){return a(function(e){return t.map(function(t){return t.map(e)})})}([I,A]),throttle:0,backToNormal:1e3},H=function(t){return!(!t||"object"!=typeof t)&&("object"==typeof window&&"object"==typeof window.Node?t instanceof window.Node:"number"==typeof t.nodeType&&"string"==typeof t.nodeName)},J=function(t,e){function n(){a=0,i=+new Date,u=t.apply(r,o),r=null,o=null}var r,o,u,a,i=0;return function(){r=this,o=arguments;var t=new Date-i;return a||(t>=e?n():a=setTimeout(n,e-t)),u}},K=function(t,e,n){function r(){var c=Date.now()-i;c<e&&c>=0?o=setTimeout(r,e-c):(o=null,n||(l=t.apply(a,u),a=u=null))}var o,u,a,i,l;null==e&&(e=100);var c=function(){a=this,u=arguments,i=Date.now();var c=n&&!o;return o||(o=setTimeout(r,e)),c&&(l=t.apply(a,u),a=u=null),l};return c.clear=function(){o&&(clearTimeout(o),o=null)},c};return function(t){return H(t)?[t]:"string"==typeof t?[].slice.call(document.querySelectorAll(t)):void 0}("img[data-creepy]").forEach(function(t){return c(t)}),c}); |
{ | ||
"name": "creepyface", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Alejandro Tardín <alejandro@tardin.com>", | ||
@@ -27,2 +27,3 @@ "license": "MIT", | ||
"data-attrs-to-js": "^1.1.1", | ||
"debounce": "^1.0.2", | ||
"get-element-center": "^1.1.0", | ||
@@ -29,0 +30,0 @@ "image-promise": "^5.0.1", |
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
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
27794
474
9
+ Addeddebounce@^1.0.2
+ Addeddebounce@1.2.1(transitive)