Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uhooks-fx

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhooks-fx - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

4

es.js

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

self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const l=new WeakMap,c=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)},o=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},u=new WeakMap,a=[],r=[];function h(e,t){return e!==this[t]}const i=()=>l.get(n),f=e=>"function"==typeof e,p=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return l.set(s,t),s;function s(){const l=n;n=s,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=l,a.length&&d.then(a.forEach.bind(a.splice(0),c)),r.length&&r.splice(0).forEach(c)}}},d=new t((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=i(),{i:s,s:l}=n;return s!==l.length&&t&&!t.some(h,l[s]._)||(l[s]={$:e(),_:t}),l[n.i++].$},w=e=>(t,n)=>{const s=i(),{i:l,s:c,h:o}=s,a=l===c.length;a&&(u.has(o)||u.set(o,new Set),c.push({$:t,_:n,r:null,h:o}));const r=c[s.i++];(a||!n||n.some(h,r._))&&e.push(r)},_=w(a),v=w(r),E=(e,t)=>f(t)?t(e):t,$=(e,t,n)=>{const l=i(),{i:c,s:u}=l;c===u.length&&u.push({$:f(n)?n(t):E(void 0,t),set:t=>{u[c].$=e(u[c].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),d.then(o))})(l)}});const{$:a,set:r}=u[l.i++];return[a,r]};
self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const l=new WeakMap,a=e=>{const{$:t,r:n,h:s}=e;f(n)&&(o.get(s).delete(e),n()),f(e.r=t())&&o.get(s).add(e)},c=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},o=new WeakMap,u=[],r=[];function h(e,t){return e!==this[t]}const i=()=>l.get(n),f=e=>"function"==typeof e,p=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return l.set(s,t),s;function s(){const l=n;n=s,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=l,u.length&&d.then(u.forEach.bind(u.splice(0),a)),r.length&&r.splice(0).forEach(a)}}},d=new t((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 _=(e,t)=>{const n=i(),{i:s,s:l}=n;return s!==l.length&&t&&!t.some(h,l[s]._)||(l[s]={$:e(),_:t}),l[n.i++].$},g=e=>(t,n)=>{const s=i(),{i:l,s:a,h:c}=s,u=l===a.length;s.i++,u&&(o.has(c)||o.set(c,new Set),a[l]={$:t,_:n,r:null,h:c}),(u||!n||n.some(h,a[l]._))&&e.push(a[l]),a[l].$=t,a[l]._=n},w=g(u),v=g(r),E=(e,t)=>f(t)?t(e):t,$=(e,t,n)=>{const l=i(),{i:a,s:o}=l;a===o.length&&o.push({$:f(n)?n(t):E(void 0,t),set:t=>{o[a].$=e(o[a].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),d.then(c))})(l)}});const{$:u,set:r}=o[l.i++];return[u,r]};
/*! (c) Andrea Giammarchi - ISC */
let k=null,S=null,M=null;const m=new WeakMap,b=(e,t,n,s)=>e?[s[0],l=>{m.has(e)||(m.set(e,0),d.then((()=>{m.delete(e),e.apply(t,n)}))),s[1](l)}]:s;return e.createContext=e=>({_:new Set,provide:y,value:e}),e.dropEffect=e=>{const t=u.get(e);t&&d.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))},e.hasEffect=e=>u.has(e),e.hooked=(e,t)=>p(t?function t(){const[n,s,l]=[k,S,M];[k,S,M]=[t,this,arguments];try{return e.apply(S,M)}finally{[k,S,M]=[n,s,l]}}:e),e.useCallback=(e,t)=>g((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(i()),t),e.useEffect=_,e.useLayoutEffect=v,e.useMemo=g,e.useReducer=(e,t,n)=>b(k,S,M,$(e,t,n)),e.useRef=e=>{const t=i(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>b(k,S,M,(e=>$(E,e))(e)),e.wait=d,e}({});
let k=null,S=null,M=null;const m=new WeakMap,b=(e,t,n,s)=>e?[s[0],l=>{m.has(e)||(m.set(e,0),d.then((()=>{m.delete(e),e.apply(t,n)}))),s[1](l)}]:s;return e.createContext=e=>({_:new Set,provide:y,value:e}),e.dropEffect=e=>{const t=o.get(e);t&&d.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))},e.hasEffect=e=>o.has(e),e.hooked=(e,t)=>p(t?function t(){const[n,s,l]=[k,S,M];[k,S,M]=[t,this,arguments];try{return e.apply(S,M)}finally{[k,S,M]=[n,s,l]}}:e),e.useCallback=(e,t)=>_((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(i()),t),e.useEffect=w,e.useLayoutEffect=v,e.useMemo=_,e.useReducer=(e,t,n)=>b(k,S,M,$(e,t,n)),e.useRef=e=>{const t=i(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>b(k,S,M,(e=>$(E,e))(e)),e.wait=d,e}({});

@@ -171,6 +171,7 @@ self.uhooksFX = (function (exports) {

var call = i === s.length;
info.i++;
if (call) {
if (!fx.has(h)) fx.set(h, new Set());
s.push({
s[i] = {
$: callback,

@@ -180,7 +181,8 @@ _: guards,

h: h
});
};
}
var effect = s[info.i++];
if (call || !guards || guards.some(different, effect._)) stack.push(effect);
if (call || !guards || guards.some(different, s[i]._)) stack.push(s[i]);
s[i].$ = callback;
s[i]._ = guards;
};

@@ -187,0 +189,0 @@ };

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

self.uhooksFX=function(n){"use strict";var t="function"==typeof Promise?Promise:function(n){var t,e=[],u=0;return n((function(n){t=n,u=1,e.splice(0).forEach(r)})),{then:r};function r(n){return u?setTimeout(n,0,t):e.push(n),this}},e=null,u=new Set,r=new WeakMap,i=function(n){var t=n.$,e=n.r,u=n.h;h(e)&&(c.get(u).delete(n),e()),h(n.r=t())&&c.get(u).add(n)},o=function(){var n=u;u=new Set,n.forEach((function(n){var t=n.h,e=n.c,u=n.a;n.e&&t.apply(e,u)}))},c=new WeakMap,a=[],f=[];function s(n,t){return n!==this[t]}var l=function(){return r.get(e)},h=function(n){return"function"==typeof n},v=new t((function(n){return n()}));function p(n){var t=this._;this.value!==n&&(this._=new Set,this.value=n,t.forEach((function(n){var t=n.h,e=n.c,u=n.a;t.apply(e,u)})))}var d=function(n,t){var e=l(),u=e.i,r=e.s;return u!==r.length&&t&&!t.some(s,r[u]._)||(r[u]={$:n(),_:t}),r[e.i++].$},y=function(n){return function(t,e){var u=l(),r=u.i,i=u.s,o=u.h,a=r===i.length;a&&(c.has(o)||c.set(o,new Set),i.push({$:t,_:e,r:null,h:o}));var f=i[u.i++];(a||!e||e.some(s,f._))&&n.push(f)}},g=y(a),w=y(f),E=function(n,t){return h(t)?t(n):t},$=function(n,t,e){var r=l(),i=r.i,c=r.s;i===c.length&&c.push({$:h(e)?e(t):E(void 0,t),set:function(t){c[i].$=n(c[i].$,t),function(n){u.has(n)||(n.e=1,u.add(n),v.then(o))}(r)}});var a=c[r.i++];return[a.$,a.set]},_=null,k=null,m=null,S=new WeakMap,M=function(n,t,e,u){return n?[u[0],function(r){S.has(n)||(S.set(n,0),v.then((function(){S.delete(n),n.apply(t,e)}))),u[1](r)}]:u};return n.createContext=function(n){return{_:new Set,provide:p,value:n}},n.dropEffect=function(n){var t=c.get(n);t&&v.then((function(){t.forEach((function(n){n.r(),n.r=null})),t.clear()}))},n.hasEffect=function(n){return c.has(n)},n.hooked=function(n,t){return function(n){var t={h:u,c:null,a:null,e:0,i:0,s:[]};return r.set(u,t),u;function u(){var r=e;e=u,t.e=t.i=0;try{return n.apply(t.c=this,t.a=arguments)}finally{e=r,a.length&&v.then(a.forEach.bind(a.splice(0),i)),f.length&&f.splice(0).forEach(i)}}}(t?function t(){var e=_,u=k,r=m;_=t,k=this,m=arguments;try{return n.apply(k,m)}finally{_=e,k=u,m=r}}:n)},n.useCallback=function(n,t){return d((function(){return n}),t)},n.useContext=function(n){var t=n._,e=n.value;return t.add(l()),e},n.useEffect=g,n.useLayoutEffect=w,n.useMemo=d,n.useReducer=function(n,t,e){return M(_,k,m,$(n,t,e))},n.useRef=function(n){var t=l(),e=t.i,u=t.s;return e===u.length&&u.push({current:n}),u[t.i++]},n.useState=function(n){return M(_,k,m,function(n){return $(E,n)}(n))},n.wait=v,n}({});
self.uhooksFX=function(n){"use strict";var t="function"==typeof Promise?Promise:function(n){var t,e=[],u=0;return n((function(n){t=n,u=1,e.splice(0).forEach(r)})),{then:r};function r(n){return u?setTimeout(n,0,t):e.push(n),this}},e=null,u=new Set,r=new WeakMap,i=function(n){var t=n.$,e=n.r,u=n.h;h(e)&&(c.get(u).delete(n),e()),h(n.r=t())&&c.get(u).add(n)},o=function(){var n=u;u=new Set,n.forEach((function(n){var t=n.h,e=n.c,u=n.a;n.e&&t.apply(e,u)}))},c=new WeakMap,a=[],f=[];function s(n,t){return n!==this[t]}var l=function(){return r.get(e)},h=function(n){return"function"==typeof n},v=new t((function(n){return n()}));function p(n){var t=this._;this.value!==n&&(this._=new Set,this.value=n,t.forEach((function(n){var t=n.h,e=n.c,u=n.a;t.apply(e,u)})))}var d=function(n,t){var e=l(),u=e.i,r=e.s;return u!==r.length&&t&&!t.some(s,r[u]._)||(r[u]={$:n(),_:t}),r[e.i++].$},y=function(n){return function(t,e){var u=l(),r=u.i,i=u.s,o=u.h,a=r===i.length;u.i++,a&&(c.has(o)||c.set(o,new Set),i[r]={$:t,_:e,r:null,h:o}),(a||!e||e.some(s,i[r]._))&&n.push(i[r]),i[r].$=t,i[r]._=e}},g=y(a),w=y(f),E=function(n,t){return h(t)?t(n):t},$=function(n,t,e){var r=l(),i=r.i,c=r.s;i===c.length&&c.push({$:h(e)?e(t):E(void 0,t),set:function(t){c[i].$=n(c[i].$,t),function(n){u.has(n)||(n.e=1,u.add(n),v.then(o))}(r)}});var a=c[r.i++];return[a.$,a.set]},_=null,k=null,m=null,S=new WeakMap,M=function(n,t,e,u){return n?[u[0],function(r){S.has(n)||(S.set(n,0),v.then((function(){S.delete(n),n.apply(t,e)}))),u[1](r)}]:u};return n.createContext=function(n){return{_:new Set,provide:p,value:n}},n.dropEffect=function(n){var t=c.get(n);t&&v.then((function(){t.forEach((function(n){n.r(),n.r=null})),t.clear()}))},n.hasEffect=function(n){return c.has(n)},n.hooked=function(n,t){return function(n){var t={h:u,c:null,a:null,e:0,i:0,s:[]};return r.set(u,t),u;function u(){var r=e;e=u,t.e=t.i=0;try{return n.apply(t.c=this,t.a=arguments)}finally{e=r,a.length&&v.then(a.forEach.bind(a.splice(0),i)),f.length&&f.splice(0).forEach(i)}}}(t?function t(){var e=_,u=k,r=m;_=t,k=this,m=arguments;try{return n.apply(k,m)}finally{_=e,k=u,m=r}}:n)},n.useCallback=function(n,t){return d((function(){return n}),t)},n.useContext=function(n){var t=n._,e=n.value;return t.add(l()),e},n.useEffect=g,n.useLayoutEffect=w,n.useMemo=d,n.useReducer=function(n,t,e){return M(_,k,m,$(n,t,e))},n.useRef=function(n){var t=l(),e=t.i,u=t.s;return e===u.length&&u.push({current:n}),u[t.i++]},n.useState=function(n){return M(_,k,m,function(n){return $(E,n)}(n))},n.wait=v,n}({});
{
"name": "uhooks-fx",
"version": "0.1.5",
"version": "0.1.6",
"description": "uhooks with propagated states",

@@ -47,3 +47,3 @@ "main": "./cjs/index.js",

"dependencies": {
"uhooks": "^0.1.18"
"uhooks": "^0.1.19"
},

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

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