Socket
Socket
Sign inDemoInstall

uhooks-dom

Package Overview
Dependencies
5
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

6

async.js

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

self.uhooksDOM=function(e){"use strict";var t=CustomEvent;const n=(e,t,n,c)=>{const o=new WeakMap,a=new WeakMap,r=new WeakMap,l=e=>o.has(e),u=e=>{l(e)&&(i(e,e.removeEventListener,o.get(e)),o.delete(e))},i=(e,t,n)=>{t.call(e,"disconnected",n),t.call(e,"connected",n)},h=(e,t,n,s)=>{for(let{length:c}=e,o=0;o<c;o++)d(e[o],t,n,s)},d=(e,s,c,o)=>{l(e)&&!c.has(e)&&(o.delete(e),c.set(e,0),e.dispatchEvent(new(n||CustomEvent)(s))),h(e[t||"children"]||[],s,c,o)},p=new(c||MutationObserver)((e=>{for(let{length:t}=e,n=0;n<t;n++){const{removedNodes:t,addedNodes:s}=e[n];h(t,"disconnected",r,a),h(s,"connected",a,r)}}));return p.observe(e||document,{subtree:!0,childList:!0}),{has:l,connect:(e,t)=>{u(e),(t||(t={})).handleEvent||(t.handleEvent=s),i(e,e.addEventListener,t),o.set(e,t)},disconnect:u,kill(){p.disconnect()}}};function s(e){e.type in this&&this[e.type](e)}var c=Promise;let o=null,a=new Set;const r=e=>{const{$:t,r:n,h:s}=e;f(n)&&(u.get(s).delete(e),n()),f(e.r=t())&&u.get(s).add(e)},l=()=>{const e=a;a=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},u=new WeakMap,i=[],h=[];function d(e,t){return e!==this[t]}const p=()=>o,f=e=>"function"==typeof e,v=e=>{const t={h:n,c:null,a:null,e:0,i:0,s:[]};return n;function n(){const n=o;o=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{o=n,i.length&&w.then(i.forEach.bind(i.splice(0),r)),h.length&&h.splice(0).forEach(r)}}},w=new c((e=>e()));function y(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const g=(e,t)=>{const n=p(),{i:s,s:c}=n;return s!==c.length&&t&&!t.some(d,c[s]._)||(c[s]={$:e(),_:t}),c[n.i++].$},E=e=>(t,n)=>{const s=p(),{i:c,s:o,h:a}=s,r=c===o.length;s.i++,r&&(u.has(a)||u.set(a,new Set),o[c]={$:t,_:n,r:null,h:a}),(r||!n||n.some(d,o[c]._))&&e.push(o[c]),o[c].$=t,o[c]._=n},k=E(i),m=E(h),M=(e,t)=>f(t)?t(e):t,_=(e,t,n)=>{const s=p(),{i:c,s:o}=s;c===o.length&&o.push({$:f(n)?n(t):M(void 0,t),set:t=>{o[c].$=e(o[c].$,t),(e=>{a.has(e)||(e.e=1,a.add(e),w.then(l))})(s)}});const{$:r,set:u}=o[s.i++];return[r,u]},b=new WeakMap,$=e=>(e=>{const t=u.get(e);t&&w.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))})(b.get(e)),S=e=>(e=>u.has(e))(b.get(e)),W=e=>{const t=v(e);return b.set(n,t),n;async function n(){return await t.apply(this,arguments)}};
self.uhooksDOM=function(e){"use strict";var t=CustomEvent;const n=(e,t,n,c)=>{const o=new WeakMap,a=new WeakMap,r=new WeakMap,l=e=>o.has(e),i=e=>{l(e)&&(u(e,e.removeEventListener,o.get(e)),o.delete(e))},u=(e,t,n)=>{t.call(e,"disconnected",n),t.call(e,"connected",n)},h=(e,t,n,s)=>{for(let{length:c}=e,o=0;o<c;o++)d(e[o],t,n,s)},d=(e,s,c,o)=>{l(e)&&!c.has(e)&&(o.delete(e),c.set(e,0),e.dispatchEvent(new(n||CustomEvent)(s))),h(e[t||"children"]||[],s,c,o)},p=new(c||MutationObserver)((e=>{for(let{length:t}=e,n=0;n<t;n++){const{removedNodes:t,addedNodes:s}=e[n];h(t,"disconnected",r,a),h(s,"connected",a,r)}}));return p.observe(e||document,{subtree:!0,childList:!0}),{has:l,connect:(e,t)=>{i(e),(t||(t={})).handleEvent||(t.handleEvent=s),u(e,e.addEventListener,t),o.set(e,t)},disconnect:i,kill(){p.disconnect()}}};function s(e){e.type in this&&this[e.type](e)}var c=Promise;let o=null,a=new Set;const r=e=>{const{$:t,r:n,h:s}=e;f(n)&&(i.get(s).delete(e),n()),f(e.r=t())&&i.get(s).add(e)},l=()=>{const e=a;a=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},i=new WeakMap,u=[],h=[];function d(e,t){return e!==this[t]}const p=()=>o,f=e=>"function"==typeof e,v=e=>{const t={h:n,c:null,a:null,e:0,i:0,s:[]};return n;function n(){const n=o;o=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{o=n,u.length&&w.then(u.forEach.bind(u.splice(0),r)),h.length&&h.splice(0).forEach(r)}}},w=new c((e=>e()));function y(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const g=(e,t)=>{const n=p(),{i:s,s:c}=n;return s!==c.length&&t&&!t.some(d,c[s]._)||(c[s]={$:e(),_:t}),c[n.i++].$},E=e=>(t,n)=>{const s=p(),{i:c,s:o,h:a}=s,r=c===o.length;s.i++,r&&(i.has(a)||i.set(a,new Set),o[c]={$:t,_:n,r:null,h:a}),(r||!n||n.some(d,o[c]._))&&e.push(o[c]),o[c].$=t,o[c]._=n},k=E(u),m=E(h),M=(e,t)=>f(t)?t(e):t,$=(e,t,n)=>{const s=p(),{i:c,s:o}=s;c===o.length&&o.push({$:f(n)?n(t):M(void 0,t),set:t=>{o[c].$=e(o[c].$,t),(e=>{a.has(e)||(e.e=1,a.add(e),w.then(l))})(s)}});const{$:r,set:i}=o[s.i++];return[r,i]},_=new WeakMap,b=e=>(e=>{const t=i.get(e);t&&w.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))})(_.get(e)),S=e=>(e=>i.has(e))(_.get(e)),W=e=>{const t=v(e);return _.set(n,t),n;async function n(){return await t.apply(this,arguments)}};
/*! (c) Andrea Giammarchi - ISC */
let C=null,L=null,O=null;const x=new WeakMap,D=new WeakMap,N=(e,t,n,s)=>{const c=c=>{x.has(e)||(x.set(e,0),w.then((()=>{x.delete(e),e.apply(t,n)}))),s(c)};return D.set(s,c),c},P=(e,t,n,s)=>e?[s[0],D.get(s[1])||N(e,t,n,s[1])]:s,R=(e,t)=>{const n=W(t?async function(){const[t,s,c]=[C,L,O];[C,L,O]=[n,this,arguments];try{return await e.apply(L,O)}finally{[C,L,O]=[t,s,c]}}:e);return n};
let C=null,L=null,x=null;const O=new WeakMap,D=new WeakMap,N=(e,t,n,s)=>{const c=c=>{O.has(e)||(O.set(e,0),w.then((()=>{O.delete(e),e.apply(t,n)}))),s(c)};return D.set(s,c),c},R=(e,t,n,s)=>e?[s[0],D.get(s[1])||N(e,t,n,s[1])]:s,T=(e,t)=>{const n=W(t?async function(){const[t,s,c]=[C,L,x];[C,L,x]=[n,this,arguments];try{return await e.apply(L,x)}finally{[C,L,x]=[t,s,c]}}:e);return n};
/*! (c) Andrea Giammarchi - ISC */
let T=null;const j=({firstChild:e})=>{if(e&&1!==e.nodeType&&!(e=e.nextElementSibling))throw"unobservable";return e},q=e=>{const{nodeType:t}=e;if(t)return 1===t?e:j(e);{const t=e.valueOf();return t!==e?q(t):j(t)}};return e.createContext=e=>({_:new Set,provide:y,value:e}),e.hooked=(e,s)=>{const c=R(e,s);return async function(){const e=await c.apply(this,arguments);if(S(c)){const s=q(e);T||(T=n(s.ownerDocument,"children",t)),T.has(s)||T.connect(s,{disconnected(){$(c)}})}return e}},e.useCallback=(e,t)=>g((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(p()),t),e.useEffect=k,e.useLayoutEffect=m,e.useMemo=g,e.useReducer=(e,t,n)=>P(C,L,O,_(e,t,n)),e.useRef=e=>{const t=p(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>P(C,L,O,(e=>_(M,e))(e)),e.wait=w,e}({});
let P=null;const j=({firstChild:e})=>{if(e&&1!==e.nodeType&&!(e=e.nextElementSibling))throw"unobservable";return e},q=e=>{const{nodeType:t}=e;if(t)return 1===t?e:j(e);{const t=e.valueOf();return t!==e?q(t):j(t)}};return e.createContext=e=>({_:new Set,provide:y,value:e}),e.hooked=(e,s)=>{const c=T(e,s);return async function(){const e=await c.apply(this,arguments);if(S(c)){const s=q(e);P||(P=n(s.ownerDocument,"children",t)),P.has(s)||P.connect(s,{disconnected(){b(c)}})}return e}},e.useCallback=(e,t)=>g((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(p()),t),e.useEffect=k,e.useLayoutEffect=m,e.useMemo=g,e.useReducer=(e,t,n)=>R(C,L,x,$(e,t,n)),e.useRef=e=>{const t=p(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>R(C,L,x,(e=>$(M,e))(e)),e.wait=w,e}({});

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

self.uhooksDOM=function(e){"use strict";var t=CustomEvent;const n=(e,t,n,o)=>{const c=new WeakMap,r=new WeakMap,l=new WeakMap,a=e=>c.has(e),u=e=>{a(e)&&(i(e,e.removeEventListener,c.get(e)),c.delete(e))},i=(e,t,n)=>{t.call(e,"disconnected",n),t.call(e,"connected",n)},h=(e,t,n,s)=>{for(let{length:o}=e,c=0;c<o;c++)d(e[c],t,n,s)},d=(e,s,o,c)=>{a(e)&&!o.has(e)&&(c.delete(e),o.set(e,0),e.dispatchEvent(new(n||CustomEvent)(s))),h(e[t||"children"]||[],s,o,c)},p=new(o||MutationObserver)((e=>{for(let{length:t}=e,n=0;n<t;n++){const{removedNodes:t,addedNodes:s}=e[n];h(t,"disconnected",l,r),h(s,"connected",r,l)}}));return p.observe(e||document,{subtree:!0,childList:!0}),{has:a,connect:(e,t)=>{u(e),(t||(t={})).handleEvent||(t.handleEvent=s),i(e,e.addEventListener,t),c.set(e,t)},disconnect:u,kill(){p.disconnect()}}};function s(e){e.type in this&&this[e.type](e)}var o=Promise;let c=null,r=new Set;const l=e=>{const{$:t,r:n,h:s}=e;w(n)&&(u.get(s).delete(e),n()),w(e.r=t())&&u.get(s).add(e)},a=()=>{const e=r;r=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},u=new WeakMap,i=[],h=[];function d(e,t){return e!==this[t]}const p=e=>{const t=u.get(e);t&&E.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))},f=()=>c,v=e=>u.has(e),w=e=>"function"==typeof e,y=e=>{const t={h:n,c:null,a:null,e:0,i:0,s:[]};return n;function n(){const n=c;c=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{c=n,i.length&&E.then(i.forEach.bind(i.splice(0),l)),h.length&&h.splice(0).forEach(l)}}},E=new o((e=>e()));function g(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const m=(e,t)=>{const n=f(),{i:s,s:o}=n;return s!==o.length&&t&&!t.some(d,o[s]._)||(o[s]={$:e(),_:t}),o[n.i++].$},_=e=>(t,n)=>{const s=f(),{i:o,s:c,h:r}=s,l=o===c.length;s.i++,l&&(u.has(r)||u.set(r,new Set),c[o]={$:t,_:n,r:null,h:r}),(l||!n||n.some(d,c[o]._))&&e.push(c[o]),c[o].$=t,c[o]._=n},k=_(i),M=_(h),b=(e,t)=>w(t)?t(e):t,$=(e,t,n)=>{const s=f(),{i:o,s:c}=s;o===c.length&&c.push({$:w(n)?n(t):b(void 0,t),set:t=>{c[o].$=e(c[o].$,t),(e=>{r.has(e)||(e.e=1,r.add(e),E.then(a))})(s)}});const{$:l,set:u}=c[s.i++];return[l,u]};
self.uhooksDOM=function(e){"use strict";var t=CustomEvent;const n=(e,t,n,c)=>{const o=new WeakMap,r=new WeakMap,l=new WeakMap,a=e=>o.has(e),u=e=>{a(e)&&(i(e,e.removeEventListener,o.get(e)),o.delete(e))},i=(e,t,n)=>{t.call(e,"disconnected",n),t.call(e,"connected",n)},h=(e,t,n,s)=>{for(let{length:c}=e,o=0;o<c;o++)d(e[o],t,n,s)},d=(e,s,c,o)=>{a(e)&&!c.has(e)&&(o.delete(e),c.set(e,0),e.dispatchEvent(new(n||CustomEvent)(s))),h(e[t||"children"]||[],s,c,o)},p=new(c||MutationObserver)((e=>{for(let{length:t}=e,n=0;n<t;n++){const{removedNodes:t,addedNodes:s}=e[n];h(t,"disconnected",l,r),h(s,"connected",r,l)}}));return p.observe(e||document,{subtree:!0,childList:!0}),{has:a,connect:(e,t)=>{u(e),(t||(t={})).handleEvent||(t.handleEvent=s),i(e,e.addEventListener,t),o.set(e,t)},disconnect:u,kill(){p.disconnect()}}};function s(e){e.type in this&&this[e.type](e)}var c=Promise;let o=null,r=new Set;const l=e=>{const{$:t,r:n,h:s}=e;w(n)&&(u.get(s).delete(e),n()),w(e.r=t())&&u.get(s).add(e)},a=()=>{const e=r;r=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},u=new WeakMap,i=[],h=[];function d(e,t){return e!==this[t]}const p=e=>{const t=u.get(e);t&&E.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))},f=()=>o,v=e=>u.has(e),w=e=>"function"==typeof e,y=e=>{const t={h:n,c:null,a:null,e:0,i:0,s:[]};return n;function n(){const n=o;o=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{o=n,i.length&&E.then(i.forEach.bind(i.splice(0),l)),h.length&&h.splice(0).forEach(l)}}},E=new c((e=>e()));function g(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const m=(e,t)=>{const n=f(),{i:s,s:c}=n;return s!==c.length&&t&&!t.some(d,c[s]._)||(c[s]={$:e(),_:t}),c[n.i++].$},k=e=>(t,n)=>{const s=f(),{i:c,s:o,h:r}=s,l=c===o.length;s.i++,l&&(u.has(r)||u.set(r,new Set),o[c]={$:t,_:n,r:null,h:r}),(l||!n||n.some(d,o[c]._))&&e.push(o[c]),o[c].$=t,o[c]._=n},M=k(i),$=k(h),_=(e,t)=>w(t)?t(e):t,b=(e,t,n)=>{const s=f(),{i:c,s:o}=s;c===o.length&&o.push({$:w(n)?n(t):_(void 0,t),set:t=>{o[c].$=e(o[c].$,t),(e=>{r.has(e)||(e.e=1,r.add(e),E.then(a))})(s)}});const{$:l,set:u}=o[s.i++];return[l,u]};
/*! (c) Andrea Giammarchi - ISC */
let S=null,C=null,W=null;const L=new WeakMap,O=new WeakMap,x=(e,t,n,s)=>{const o=o=>{L.has(e)||(L.set(e,0),E.then((()=>{L.delete(e),e.apply(t,n)}))),s(o)};return O.set(s,o),o},D=(e,t,n,s)=>e?[s[0],O.get(s[1])||x(e,t,n,s[1])]:s,N=(e,t)=>{const n=y(t?function(){const[t,s,o]=[S,C,W];[S,C,W]=[n,this,arguments];try{return e.apply(C,W)}finally{[S,C,W]=[t,s,o]}}:e);return n};
let S=null,C=null,W=null;const L=new WeakMap,x=new WeakMap,O=(e,t,n,s)=>{const c=c=>{L.has(e)||(L.set(e,0),E.then((()=>{L.delete(e),e.apply(t,n)}))),s(c)};return x.set(s,c),c},D=(e,t,n,s)=>e?[s[0],x.get(s[1])||O(e,t,n,s[1])]:s,N=(e,t)=>{const n=y(t?function(){const[t,s,c]=[S,C,W];[S,C,W]=[n,this,arguments];try{return e.apply(C,W)}finally{[S,C,W]=[t,s,c]}}:e);return n};
/*! (c) Andrea Giammarchi - ISC */
let P=null;const R=({firstChild:e})=>{if(e&&1!==e.nodeType&&!(e=e.nextElementSibling))throw"unobservable";return e},T=e=>{const{nodeType:t}=e;if(t)return 1===t?e:R(e);{const t=e.valueOf();return t!==e?T(t):R(t)}};return e.createContext=e=>({_:new Set,provide:g,value:e}),e.hooked=(e,s)=>{const o=N(e,s);return function(){const e=o.apply(this,arguments);if(v(o)){const s=T(e);P||(P=n(s.ownerDocument,"children",t)),P.has(s)||P.connect(s,{disconnected(){p(o)}})}return e}},e.useCallback=(e,t)=>m((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(f()),t),e.useEffect=k,e.useLayoutEffect=M,e.useMemo=m,e.useReducer=(e,t,n)=>D(S,C,W,$(e,t,n)),e.useRef=e=>{const t=f(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>D(S,C,W,(e=>$(b,e))(e)),e.wait=E,e}({});
let R=null;const T=({firstChild:e})=>{if(e&&1!==e.nodeType&&!(e=e.nextElementSibling))throw"unobservable";return e},P=e=>{const{nodeType:t}=e;if(t)return 1===t?e:T(e);{const t=e.valueOf();return t!==e?P(t):T(t)}};return e.createContext=e=>({_:new Set,provide:g,value:e}),e.hooked=(e,s)=>{const c=N(e,s);return function(){const e=c.apply(this,arguments);if(v(c)){const s=P(e);R||(R=n(s.ownerDocument,"children",t)),R.has(s)||R.connect(s,{disconnected(){p(c)}})}return e}},e.useCallback=(e,t)=>m((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(f()),t),e.useEffect=M,e.useLayoutEffect=$,e.useMemo=m,e.useReducer=(e,t,n)=>D(S,C,W,b(e,t,n)),e.useRef=e=>{const t=f(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>D(S,C,W,(e=>b(_,e))(e)),e.wait=E,e}({});

@@ -445,6 +445,4 @@ self.uhooksDOM = (function (exports) {

return exports;
}({}));
{
"name": "uhooks-dom",
"version": "0.2.2",
"version": "0.2.3",
"description": "A uhooks + uconnect based alternative to dom-augmentor",

@@ -10,5 +10,5 @@ "main": "./cjs/index.js",

"async": "cp esm/index.js esm/async.js && sed -i.bck 's/uhooks-fx/uhooks-fx\\/async/; s/\\/\\*async\\*\\//async/; s/\\/\\*await\\*\\//await/' esm/async.js && rm -rf esm/async.js.bck",
"rollup:async": "rollup --config rollup/async.config.js && sed -i.bck 's/^var /self./; s/Object.defineProperty[^)]*).//' async.js && rm -rf async.js.bck",
"rollup:es": "rollup --config rollup/es.config.js && sed -i.bck 's/^var /self./; s/Object.defineProperty[^)]*).//' es.js && rm -rf es.js.bck",
"rollup:babel": "rollup --config rollup/babel.config.js && sed -i.bck 's/^var /self./; s/Object.define[^;]*;//' index.js && rm -rf index.js.bck",
"rollup:async": "rollup --config rollup/async.config.js && sed -i.bck 's/^var /self./' async.js && rm -rf async.js.bck",
"rollup:es": "rollup --config rollup/es.config.js && sed -i.bck 's/^var /self./' es.js && rm -rf es.js.bck",
"rollup:babel": "rollup --config rollup/babel.config.js && sed -i.bck 's/^var /self./' index.js && rm -rf index.js.bck",
"min": "terser index.js --comments='/^!/' -c -m -o min.js",

@@ -31,3 +31,3 @@ "size": "echo 'async ES6' && cat async.js | brotli | wc -c && echo '' && echo 'sync ES5 / ES6' && cat min.js | brotli | wc -c && cat es.js | brotli | wc -c"

"ascjs": "^4.0.3",
"rollup": "^2.36.0",
"rollup": "^2.36.1",
"rollup-plugin-includepaths": "^0.2.4",

@@ -54,3 +54,3 @@ "rollup-plugin-terser": "^7.0.2",

"uconnect": "^0.2.7",
"uhooks-fx": "^0.2.2"
"uhooks-fx": "^0.2.3"
},

@@ -57,0 +57,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc