Socket
Socket
Sign inDemoInstall

use-sync-external-store

Package Overview
Dependencies
1
Maintainers
3
Versions
1195
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-experimental-47cf4e578-20230315 to 0.0.0-experimental-48ec17b86-20240402

cjs/use-sync-external-store-shim.native.production.js

20

cjs/use-sync-external-store-shim.native.production.min.js

@@ -1,11 +0,13 @@

/**
* @license React
* use-sync-external-store-shim.native.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
React
use-sync-external-store-shim.native.production.min.js
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';var e=require("react");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:q;
//# sourceMappingURL=use-sync-external-store-shim.native.production.min.js.map

@@ -1,11 +0,13 @@

/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
React
use-sync-external-store-shim.production.min.js
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';var e=require("react");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
//# sourceMappingURL=use-sync-external-store-shim.production.min.js.map

@@ -1,12 +0,14 @@

/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
React
use-sync-external-store-shim/with-selector.production.min.js
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';var h=require("react"),v=require("use-sync-external-store/shim");function w(b,c){return b===c&&(0!==b||1/b===1/c)||b!==b&&c!==c}var x="function"===typeof Object.is?Object.is:w,y=v.useSyncExternalStore,z=h.useRef,A=h.useEffect,B=h.useMemo,C=h.useDebugValue;
exports.useSyncExternalStoreWithSelector=function(b,c,m,n,g){var d=z(null);if(null===d.current){var e={hasValue:!1,value:null};d.current=e}else e=d.current;d=B(function(){function q(a){if(!r){r=!0;p=a;a=n(a);if(void 0!==g&&e.hasValue){var f=e.value;if(g(f,a))return k=f}return k=a}f=k;if(x(p,a))return f;var t=n(a);if(void 0!==g&&g(f,t))return f;p=a;return k=t}var r=!1,p,k,u=void 0===m?null:m;return[function(){return q(c())},null===u?void 0:function(){return q(u())}]},[c,m,n,g]);var l=y(b,d[0],d[1]);
A(function(){e.hasValue=!0;e.value=l},[l]);C(l);return l};
//# sourceMappingURL=with-selector.production.min.js.map

@@ -1,12 +0,14 @@

/**
* @license React
* use-sync-external-store-with-selector.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
React
use-sync-external-store-with-selector.production.min.js
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';var g=require("react");function v(b,c){return b===c&&(0!==b||1/b===1/c)||b!==b&&c!==c}var w="function"===typeof Object.is?Object.is:v,x=g.useSyncExternalStore,y=g.useRef,z=g.useEffect,A=g.useMemo,B=g.useDebugValue;
exports.useSyncExternalStoreWithSelector=function(b,c,m,n,h){var d=y(null);if(null===d.current){var e={hasValue:!1,value:null};d.current=e}else e=d.current;d=A(function(){function q(a){if(!r){r=!0;p=a;a=n(a);if(void 0!==h&&e.hasValue){var f=e.value;if(h(f,a))return k=f}return k=a}f=k;if(w(p,a))return f;var t=n(a);if(void 0!==h&&h(f,t))return f;p=a;return k=t}var r=!1,p,k,u=void 0===m?null:m;return[function(){return q(c())},null===u?void 0:function(){return q(u())}]},[c,m,n,h]);var l=x(b,d[0],d[1]);
z(function(){e.hasValue=!0;e.value=l},[l]);B(l);return l};
//# sourceMappingURL=use-sync-external-store-with-selector.production.min.js.map

@@ -1,10 +0,12 @@

/**
* @license React
* use-sync-external-store.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
React
use-sync-external-store.production.min.js
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';var a=require("react").useSyncExternalStore;exports.useSyncExternalStore=a;
//# sourceMappingURL=use-sync-external-store.production.min.js.map
{
"name": "use-sync-external-store",
"description": "Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.",
"version": "0.0.0-experimental-47cf4e578-20230315",
"version": "0.0.0-experimental-48ec17b86-20240402",
"repository": {

@@ -22,4 +22,8 @@ "type": "git",

"peerDependencies": {
"react": "0.0.0-experimental-47cf4e578-20230315"
"react": "0.0.0-experimental-48ec17b86-20240402"
},
"devDependencies": {
"react-17": "npm:react@^17",
"react-dom-17": "npm:react-dom@^17"
}
}
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