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

creepyface

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creepyface - npm Package Compare versions

Comparing version 4.1.3 to 4.1.4

2

dist/creepyface.umd.js

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

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).creepyface=e()}(this,function(){"use strict";function c(n,e,t,r,o,i,u){try{var a=n[i](u),c=a.value}catch(n){return void t(n)}a.done?e(c):Promise.resolve(c).then(r,o)}function f(a){return function(){var n=this,u=arguments;return new Promise(function(e,t){var r=a.apply(n,u);function o(n){c(r,e,t,o,i,"next",n)}function i(n){c(r,e,t,o,i,"throw",n)}o(void 0)})}}function o(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function h(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=[],r=!0,o=!1,i=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done)&&(t.push(u.value),!e||t.length!==e);r=!0);}catch(n){o=!0,i=n}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(n){return function(n){if(Array.isArray(n)){for(var e=0,t=new Array(n.length);e<n.length;e++)t[e]=n[e];return t}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=function e(r){if(!r)return Promise.reject();if("string"==typeof r){var n=r;(r=new Image).src=n}else{if(void 0!==r.length){var t=[].map.call(r,function(n){return e(n).catch(function(n){return n})});return Promise.all(t).then(function(n){var e=n.filter(function(n){return n.naturalWidth});return e.length===n.length?e:Promise.reject({loaded:e,errored:n.filter(function(n){return!n.naturalWidth})})})}if("IMG"!==r.tagName)return Promise.reject()}var o=new Promise(function(n,e){function t(){r.naturalWidth?n(r):e(r),r.removeEventListener("load",t),r.removeEventListener("error",t)}r.naturalWidth?n(r):r.complete?e(r):(r.addEventListener("load",t),r.addEventListener("error",t))});return o.image=r,o};var v=function(n,e){var t,r={};return void 0===(e=e||{}).separator&&(e.separator="-"),Array.prototype.slice.call(n.attributes).filter((t=e.pattern,function(n){var e;return e=/^data\-/.test(n.name),void 0===t?e:e&&t.test(n.name.slice(5))})).forEach(function(o){o.name.slice(5).split(e.separator).reduce(function(n,e,t,r){return"data"===e?n:(t===r.length-1?n[e]=o.value:n[e]=n[e]||{},n[e])},r)}),r};var p=function(){function e(n){!function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.subscriber=n}var n,t,r;return n=e,(t=[{key:"subscribe",value:function(n){return{unsubscribe:this.subscriber({next:n})}}}])&&o(n.prototype,t),r&&o(n,r),e}(),t=[];document.addEventListener("mousemove",function(e){return t.forEach(function(n){return n.next([e.clientX,e.clientY])})},!0);var m=new p(function(n){return t.push(n),function(){t.splice(t.indexOf(n),1)}}),s=function(n,t){return n.map(function(n,e){return n+t[e]})},a=function(n){return n*Math.PI/180},d=function(n){return e=Math.atan2(n[1],n[0]),t=2*Math.PI,180*((t+e%t)%t)/Math.PI;var e,t},e=[];document.addEventListener("touchmove",function(c){return e.forEach(function(n){var e=[0,0],t=!0,r=!1,o=void 0;try{for(var i,u=c.touches[Symbol.iterator]();!(t=(i=u.next()).done);t=!0){var a=i.value;e=s(e,[a.clientX,a.clientY])}}catch(n){r=!0,o=n}finally{try{t||null==u.return||u.return()}finally{if(r)throw o}}n.next(e)})},!0);var b=new p(function(n){return e.push(n),function(){e.splice(e.indexOf(n),1)}}),y=function(){},g=function(n){for(var e=[],t=Object.keys(n),r=0;r<t.length;r++){var o=t[r],i=n[o];i&&e.push({angle:parseFloat(o),src:i})}return e};function w(n){var e,t,r,o,i,u,a,c,f,l,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},d=Object.assign({},(t=v(e=n),r=t.src,o=void 0===r?{}:r,i=t.fieldofvision,u=t.timetodefault,a=t.resetoncancel,c=t.throttle,f={src:e.getAttribute("src")||void 0},u&&(f.timeToDefault=parseFloat(u)),c&&(f.throttle=parseFloat(c)),i&&(f.fieldOfVision=parseFloat(i)),a&&(f.resetOnCancel="true"===a),o.hover&&(f.hover=o.hover),o.look&&(f.looks=g(o.look)),f),s);if(!d.src)throw new Error("A default URL must be specified");return{fieldOfVision:d.fieldOfVision||150,src:d.src,hover:d.hover||"",points:d.points||(l=[m,b],new p(function(n){var e=n.next.bind(n),t=l.map(function(n){return n.subscribe(e)});return function(){return t.forEach(function(n){return n.unsubscribe()})}})),looks:d.looks||[],timeToDefault:d.timeToDefault||1e3,resetOnCancel:!(!1===d.resetOnCancel),throttle:d.throttle||100,onDebug:d.onDebug||y,onAttach:d.onAttach||y,onDetach:d.onDetach||y}}var O=function(n){var e=n.getBoundingClientRect(),t=e.top+window.pageYOffset+e.height/2,r=e.left+window.pageXOffset+e.width/2;return{y:t,x:r}};var x=function(n,e){return d((o=s([window.scrollX,window.scrollY],e),u=O(n),i=[u.x,u.y],t=o.map(function(n,e){return n-i[e]}),r=90,[t[0]*Math.cos(a(r))-t[1]*Math.sin(a(r)),t[0]*Math.sin(a(r))+t[1]*Math.cos(a(r))]));var t,r,o,i,u},E=function(n){return 180<Math.abs(n)?n-360*((e=n)?e<0?-1:1:0):n;var e},M=function(n,e){return e.slice(0).sort((t=n,function(n,e){return Math.abs(E(n.angle-t))-Math.abs(E(e.angle-t))}))[0];var t},j=function(n,e,t){return e<=n&&n<=t},T=function(n,e){var t,r,o,i,u,a,c,f,l,s=h(e,2),d=s[0],v=s[1];return document.elementFromPoint?document.elementFromPoint(d,v)===n:(t=n.getBoundingClientRect(),r=[d,v],o=t.left,i=t.top,u=t.right,a=t.bottom,c=h(r,2),f=c[0],l=c[1],j(f,o,u)&&j(l,i,a))},r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},D="Expected a function",i=NaN,u="[object Symbol]",A=/^\s+|\s+$/g,L=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,C=/^0o[0-7]+$/i,I=parseInt,k="object"==typeof r&&r&&r.Object===Object&&r,R="object"==typeof self&&self&&self.Object===Object&&self,F=k||R||Function("return this")(),S=Object.prototype.toString,W=Math.max,N=Math.min,V=function(){return F.Date.now()};function X(r,o,n){var i,u,a,c,f,l,s=0,d=!1,v=!1,e=!0;if("function"!=typeof r)throw new TypeError(D);function h(n){var e=i,t=u;return i=u=void 0,s=n,c=r.apply(t,e)}function p(n){var e=n-l;return void 0===l||o<=e||e<0||v&&a<=n-s}function m(){var n,e,t=V();if(p(t))return b(t);f=setTimeout(m,(e=o-((n=t)-l),v?N(e,a-(n-s)):e))}function b(n){return f=void 0,e&&i?h(n):(i=u=void 0,c)}function t(){var n,e=V(),t=p(e);if(i=arguments,u=this,l=e,t){if(void 0===f)return s=n=l,f=setTimeout(m,o),d?h(n):c;if(v)return f=setTimeout(m,o),h(l)}return void 0===f&&(f=setTimeout(m,o)),c}return o=$(o)||0,Y(n)&&(d=!!n.leading,a=(v="maxWait"in n)?W($(n.maxWait)||0,o):a,e="trailing"in n?!!n.trailing:e),t.cancel=function(){void 0!==f&&clearTimeout(f),i=l=u=f=void(s=0)},t.flush=function(){return void 0===f?c:b(V())},t}function Y(n){var e=typeof n;return!!n&&("object"==e||"function"==e)}function $(n){if("number"==typeof n)return n;if("symbol"==typeof(e=n)||(t=e)&&"object"==typeof t&&S.call(e)==u)return i;var e,t;if(Y(n)){var r="function"==typeof n.valueOf?n.valueOf():n;n=Y(r)?r+"":r}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(A,"");var o=P.test(n);return o||C.test(n)?I(n.slice(2),o?2:8):L.test(n)?i:+n}var B=function(n,e,t){var r=!0,o=!0;if("function"!=typeof n)throw new TypeError(D);return Y(t)&&(r="leading"in t?!!t.leading:r,o="trailing"in t?!!t.trailing:o),X(n,e,{leading:r,maxWait:e,trailing:o})},q=function(i,u){return new p(function(r){var o=function(e,t,r){var o,i,u,a,c;function f(){var n=Date.now()-a;n<t&&0<=n?o=setTimeout(f,t-n):(o=null,r||(c=e.apply(u,i),u=i=null))}null==t&&(t=100);var n=function(){u=this,i=arguments,a=Date.now();var n=r&&!o;return o||(o=setTimeout(f,t)),n&&(c=e.apply(u,i),u=i=null),c};return n.clear=function(){o&&(clearTimeout(o),o=null)},n.flush=function(){o&&(c=e.apply(u,i),u=i=null,clearTimeout(o),o=null)},n}(function(){return r.next({src:u.src,options:u})},u.timeToDefault),n=u.points.subscribe(B(function(n){var e=x(i,n),t=function(n,e,t,r){var o=r.looks,i=r.hover,u=r.fieldOfVision,a=r.src;if(i&&T(n,e))a=i;else{var c=M(t,o);Math.abs(E(c.angle-t))<u/2&&(a=c.src)}return a}(i,n,e,u);r.next({point:n,angle:e,src:t,options:u}),o()},u.throttle));return function(){o.clear(),n.unsubscribe()}})},G=function(e,n){var t,r,o,i=w(e,n),u=function(n){e.src=n},a=(t=e,l((r=i,o=r.looks.map(function(n){return n.src}),r.src&&o.push(r.src),r.hover&&o.push(r.hover),o)).then(function(n){return t.creepyfaceReachableImages=n,function(){delete t.creepyfaceReachableImages}})),c=a.then(function(){return i.onAttach(),q(e,i).subscribe(function(n){u(n.src),i.onDebug(n)})});return f(regeneratorRuntime.mark(function n(){var e,t;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c;case 2:return e=n.sent,n.next=5,a;case 5:t=n.sent,e.unsubscribe(),t(),i.resetOnCancel&&u(i.src),i.onDetach();case 10:case"end":return n.stop()}},n,this)}))},H=function n(e,t){n.cancel(e);var r=y,o=e,i=function(t,e,r){var o=function(n){return n?e():r()};if(MutationObserver){var i=document.body&&document.body.contains(t);i&&o(!0);var n=new MutationObserver(function(n){var e=document.body&&document.body.contains(t);!e&&i?(o(!1),i=!1):e&&!i&&(o(!0),i=!0)});return n.observe(document,{childList:!0,subtree:!0}),function(){return n.disconnect()}}return document.body&&document.body.contains(t)&&o(!0),t.addEventListener("DOMNodeInserted",function(){return o(!0)},!1),t.addEventListener("DOMNodeRemoved",function(){return o(!1)},!1),y}(e,function(){r=G(o,t)},function(){return n.cancel(e)});return o.creepyfaceCancel=function(){i(),r(),delete o.creepyfaceCancel}};return H.cancel=function(n){var e=n;e.creepyfaceCancel&&e.creepyfaceCancel()},document.addEventListener("DOMContentLoaded",function(){n(document.querySelectorAll("img[data-creepy]")).forEach(function(n){n instanceof HTMLImageElement&&H(n)})}),H});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).creepyface=t()}(this,function(){"use strict";function o(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function h(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!t||e.length!==t);r=!0);}catch(n){o=!0,i=n}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(n){return function(n){if(Array.isArray(n)){for(var t=0,e=new Array(n.length);t<n.length;t++)e[t]=n[t];return e}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var f=function t(r){if(!r)return Promise.reject();if("string"==typeof r){var n=r;(r=new Image).src=n}else{if(void 0!==r.length){var e=[].map.call(r,function(n){return t(n).catch(function(n){return n})});return Promise.all(e).then(function(n){var t=n.filter(function(n){return n.naturalWidth});return t.length===n.length?t:Promise.reject({loaded:t,errored:n.filter(function(n){return!n.naturalWidth})})})}if("IMG"!==r.tagName)return Promise.reject()}var o=new Promise(function(n,t){function e(){r.naturalWidth?n(r):t(r),r.removeEventListener("load",e),r.removeEventListener("error",e)}r.naturalWidth?n(r):r.complete?t(r):(r.addEventListener("load",e),r.addEventListener("error",e))});return o.image=r,o};var v=function(n,t){var e,r={};return void 0===(t=t||{}).separator&&(t.separator="-"),Array.prototype.slice.call(n.attributes).filter((e=t.pattern,function(n){var t;return t=/^data\-/.test(n.name),void 0===e?t:t&&e.test(n.name.slice(5))})).forEach(function(o){o.name.slice(5).split(t.separator).reduce(function(n,t,e,r){return"data"===t?n:(e===r.length-1?n[t]=o.value:n[t]=n[t]||{},n[t])},r)}),r};var p=function(){function t(n){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.subscriber=n}var n,e,r;return n=t,(e=[{key:"subscribe",value:function(n){return{unsubscribe:this.subscriber({next:n})}}}])&&o(n.prototype,e),r&&o(n,r),t}(),e=[];document.addEventListener("mousemove",function(t){return e.forEach(function(n){return n.next([t.clientX,t.clientY])})},!0);var m=new p(function(n){return e.push(n),function(){e.splice(e.indexOf(n),1)}}),l=function(n,e){return n.map(function(n,t){return n+e[t]})},a=function(n){return n*Math.PI/180},c=function(n){return t=Math.atan2(n[1],n[0]),e=2*Math.PI,180*((e+t%e)%e)/Math.PI;var t,e},t=[];document.addEventListener("touchmove",function(c){return t.forEach(function(n){var t=[0,0],e=!0,r=!1,o=void 0;try{for(var i,u=c.touches[Symbol.iterator]();!(e=(i=u.next()).done);e=!0){var a=i.value;t=l(t,[a.clientX,a.clientY])}}catch(n){r=!0,o=n}finally{try{e||null==u.return||u.return()}finally{if(r)throw o}}n.next(t)})},!0);var b=new p(function(n){return t.push(n),function(){t.splice(t.indexOf(n),1)}}),y=function(){},g=function(n){for(var t=[],e=Object.keys(n),r=0;r<e.length;r++){var o=e[r],i=n[o];i&&t.push({angle:parseFloat(o),src:i})}return t};function s(n){var t,e,r,o,i,u,a,c,f,l,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},d=Object.assign({},(e=v(t=n),r=e.src,o=void 0===r?{}:r,i=e.fieldofvision,u=e.timetodefault,a=e.resetoncancel,c=e.throttle,f={src:t.getAttribute("src")||void 0},u&&(f.timeToDefault=parseFloat(u)),c&&(f.throttle=parseFloat(c)),i&&(f.fieldOfVision=parseFloat(i)),a&&(f.resetOnCancel="true"===a),o.hover&&(f.hover=o.hover),o.look&&(f.looks=g(o.look)),f),s);if(!d.src)throw new Error("A default URL must be specified");return{fieldOfVision:d.fieldOfVision||150,src:d.src,hover:d.hover||"",points:d.points||(l=[m,b],new p(function(n){var t=n.next.bind(n),e=l.map(function(n){return n.subscribe(t)});return function(){return e.forEach(function(n){return n.unsubscribe()})}})),looks:d.looks||[],timeToDefault:d.timeToDefault||1e3,resetOnCancel:!(!1===d.resetOnCancel),throttle:d.throttle||100,onDebug:d.onDebug||y,onAttach:d.onAttach||y,onDetach:d.onDetach||y}}var d=function(n){var t=n.getBoundingClientRect(),e=t.top+window.pageYOffset+t.height/2,r=t.left+window.pageXOffset+t.width/2;return{y:e,x:r}};var w=function(n,t){return c((o=l([window.scrollX,window.scrollY],t),u=d(n),i=[u.x,u.y],e=o.map(function(n,t){return n-i[t]}),r=90,[e[0]*Math.cos(a(r))-e[1]*Math.sin(a(r)),e[0]*Math.sin(a(r))+e[1]*Math.cos(a(r))]));var e,r,o,i,u},O=function(n){return 180<Math.abs(n)?n-360*((t=n)?t<0?-1:1:0):n;var t},E=function(n,t){return t.slice(0).sort((e=n,function(n,t){return Math.abs(O(n.angle-e))-Math.abs(O(t.angle-e))}))[0];var e},M=function(n,t,e){return t<=n&&n<=e},j=function(n,t){var e,r,o,i,u,a,c,f,l,s=h(t,2),d=s[0],v=s[1];return document.elementFromPoint?document.elementFromPoint(d,v)===n:(e=n.getBoundingClientRect(),r=[d,v],o=e.left,i=e.top,u=e.right,a=e.bottom,c=h(r,2),f=c[0],l=c[1],M(f,o,u)&&M(l,i,a))},r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},x="Expected a function",i=NaN,u="[object Symbol]",T=/^\s+|\s+$/g,D=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,L=/^0o[0-7]+$/i,C=parseInt,I="object"==typeof r&&r&&r.Object===Object&&r,P="object"==typeof self&&self&&self.Object===Object&&self,k=I||P||Function("return this")(),F=Object.prototype.toString,S=Math.max,W=Math.min,R=function(){return k.Date.now()};function N(r,o,n){var i,u,a,c,f,l,s=0,d=!1,v=!1,t=!0;if("function"!=typeof r)throw new TypeError(x);function h(n){var t=i,e=u;return i=u=void 0,s=n,c=r.apply(e,t)}function p(n){var t=n-l;return void 0===l||o<=t||t<0||v&&a<=n-s}function m(){var n,t,e=R();if(p(e))return b(e);f=setTimeout(m,(t=o-((n=e)-l),v?W(t,a-(n-s)):t))}function b(n){return f=void 0,t&&i?h(n):(i=u=void 0,c)}function e(){var n,t=R(),e=p(t);if(i=arguments,u=this,l=t,e){if(void 0===f)return s=n=l,f=setTimeout(m,o),d?h(n):c;if(v)return f=setTimeout(m,o),h(l)}return void 0===f&&(f=setTimeout(m,o)),c}return o=X(o)||0,V(n)&&(d=!!n.leading,a=(v="maxWait"in n)?S(X(n.maxWait)||0,o):a,t="trailing"in n?!!n.trailing:t),e.cancel=function(){void 0!==f&&clearTimeout(f),i=l=u=f=void(s=0)},e.flush=function(){return void 0===f?c:b(R())},e}function V(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function X(n){if("number"==typeof n)return n;if("symbol"==typeof(t=n)||(e=t)&&"object"==typeof e&&F.call(t)==u)return i;var t,e;if(V(n)){var r="function"==typeof n.valueOf?n.valueOf():n;n=V(r)?r+"":r}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(T,"");var o=A.test(n);return o||L.test(n)?C(n.slice(2),o?2:8):D.test(n)?i:+n}var Y=function(n,t,e){var r=!0,o=!0;if("function"!=typeof n)throw new TypeError(x);return V(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),N(n,t,{leading:r,maxWait:t,trailing:o})},$=function(i,u){return new p(function(r){var o=function(t,e,r){var o,i,u,a,c;function f(){var n=Date.now()-a;n<e&&0<=n?o=setTimeout(f,e-n):(o=null,r||(c=t.apply(u,i),u=i=null))}null==e&&(e=100);var n=function(){u=this,i=arguments,a=Date.now();var n=r&&!o;return o||(o=setTimeout(f,e)),n&&(c=t.apply(u,i),u=i=null),c};return n.clear=function(){o&&(clearTimeout(o),o=null)},n.flush=function(){o&&(c=t.apply(u,i),u=i=null,clearTimeout(o),o=null)},n}(function(){return r.next({src:u.src,options:u})},u.timeToDefault),n=u.points.subscribe(Y(function(n){var t=w(i,n),e=function(n,t,e,r){var o=r.looks,i=r.hover,u=r.fieldOfVision,a=r.src;if(i&&j(n,t))a=i;else{var c=E(e,o);Math.abs(O(c.angle-e))<u/2&&(a=c.src)}return a}(i,n,t,u);r.next({point:n,angle:t,src:e,options:u}),o()},u.throttle));return function(){o.clear(),n.unsubscribe()}})},B=function(t,n){var e,r,o,i=s(t,n),u=function(n){t.src=n},a=(e=t,f((r=i,o=r.looks.map(function(n){return n.src}),r.src&&o.push(r.src),r.hover&&o.push(r.hover),o)).then(function(n){return e.creepyfaceReachableImages=n,function(){delete e.creepyfaceReachableImages}})),c=a.then(function(){return i.onAttach(),$(t,i).subscribe(function(n){u(n.src),i.onDebug(n)})});return function(){return c.then(function(n){return n.unsubscribe(),i.resetOnCancel&&u(i.src),i.onDetach(),a.then(function(n){return n()})})}},q=function n(t,e){n.cancel(t);var r=y,o=t,i=function(e,t,r){var o=function(n){return n?t():r()};if(MutationObserver){var i=document.body&&document.body.contains(e);i&&o(!0);var n=new MutationObserver(function(n){var t=document.body&&document.body.contains(e);!t&&i?(o(!1),i=!1):t&&!i&&(o(!0),i=!0)});return n.observe(document,{childList:!0,subtree:!0}),function(){return n.disconnect()}}return document.body&&document.body.contains(e)&&o(!0),e.addEventListener("DOMNodeInserted",function(){return o(!0)},!1),e.addEventListener("DOMNodeRemoved",function(){return o(!1)},!1),y}(t,function(){r=B(o,e)},function(){return n.cancel(t)});return o.creepyfaceCancel=function(){i(),r(),delete o.creepyfaceCancel}};return q.cancel=function(n){var t=n;t.creepyfaceCancel&&t.creepyfaceCancel()},document.addEventListener("DOMContentLoaded",function(){n(document.querySelectorAll("img[data-creepy]")).forEach(function(n){n instanceof HTMLImageElement&&q(n)})}),q});

@@ -17,11 +17,9 @@ import preload from './preload';

});
return async () => {
const subscription = await subscribed;
const unload = await preloaded;
return () => subscribed.then(subscription => {
subscription.unsubscribe();
unload();
if (options.resetOnCancel)
setSrc(options.src);
options.onDetach();
};
return preloaded.then(unload => unload());
});
};
{
"name": "creepyface",
"version": "4.1.3",
"version": "4.1.4",
"keywords": [

@@ -5,0 +5,0 @@ "face",

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