react-native-global-state-hooks 9.0.2 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +1 -1
- package/generateStackHash.d.ts +1 -0
- package/generateStackHash.js +1 -0
- package/getAsyncStorageItem.js +1 -1
- package/index.d.ts +1 -0
- package/package.json +2 -2
- package/setAsyncStorageItem.js +1 -1
- package/webpack.config.js +59 -51
package/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./asyncStorageWrapper.js"),require("./createContext.js"),require("./createCustomGlobalState.js"),require("./createGlobalState.js"),require("./debounce.js"),require("./getAsyncStorageItem.js"),require("./isRecord.js"),require("./setAsyncStorageItem.js"),require("./shallowCompare.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./uniqueId.js"),require("./uniqueSymbol.js"),require("./useStableState.js")):"function"==typeof define&&define.amd?define(["./GlobalStore.js","./GlobalStoreAbstract.js","./asyncStorageWrapper.js","./createContext.js","./createCustomGlobalState.js","./createGlobalState.js","./debounce.js","./getAsyncStorageItem.js","./isRecord.js","./setAsyncStorageItem.js","./shallowCompare.js","./throwWrongKeyOnActionCollectionConfig.js","./uniqueId.js","./uniqueSymbol.js","./useStableState.js"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./asyncStorageWrapper.js"),require("./createContext.js"),require("./createCustomGlobalState.js"),require("./createGlobalState.js"),require("./debounce.js"),require("./getAsyncStorageItem.js"),require("./isRecord.js"),require("./setAsyncStorageItem.js"),require("./shallowCompare.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./uniqueId.js"),require("./uniqueSymbol.js"),require("./useStableState.js")):e["react-native-global-state-hooks"]=t(e["./GlobalStore.js"],e["./GlobalStoreAbstract.js"],e["./asyncStorageWrapper.js"],e["./createContext.js"],e["./createCustomGlobalState.js"],e["./createGlobalState.js"],e["./debounce.js"],e["./getAsyncStorageItem.js"],e["./isRecord.js"],e["./setAsyncStorageItem.js"],e["./shallowCompare.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./uniqueId.js"],e["./uniqueSymbol.js"],e["./useStableState.js"])}(this,((e,t,r,o,a,n,s,u,l,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./asyncStorageWrapper.js"),require("./createContext.js"),require("./createCustomGlobalState.js"),require("./createGlobalState.js"),require("./debounce.js"),require("./generateStackHash.js"),require("./getAsyncStorageItem.js"),require("./isRecord.js"),require("./setAsyncStorageItem.js"),require("./shallowCompare.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./uniqueId.js"),require("./uniqueSymbol.js"),require("./useStableState.js")):"function"==typeof define&&define.amd?define(["./GlobalStore.js","./GlobalStoreAbstract.js","./asyncStorageWrapper.js","./createContext.js","./createCustomGlobalState.js","./createGlobalState.js","./debounce.js","./generateStackHash.js","./getAsyncStorageItem.js","./isRecord.js","./setAsyncStorageItem.js","./shallowCompare.js","./throwWrongKeyOnActionCollectionConfig.js","./uniqueId.js","./uniqueSymbol.js","./useStableState.js"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./asyncStorageWrapper.js"),require("./createContext.js"),require("./createCustomGlobalState.js"),require("./createGlobalState.js"),require("./debounce.js"),require("./generateStackHash.js"),require("./getAsyncStorageItem.js"),require("./isRecord.js"),require("./setAsyncStorageItem.js"),require("./shallowCompare.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./uniqueId.js"),require("./uniqueSymbol.js"),require("./useStableState.js")):e["react-native-global-state-hooks"]=t(e["./GlobalStore.js"],e["./GlobalStoreAbstract.js"],e["./asyncStorageWrapper.js"],e["./createContext.js"],e["./createCustomGlobalState.js"],e["./createGlobalState.js"],e["./debounce.js"],e["./generateStackHash.js"],e["./getAsyncStorageItem.js"],e["./isRecord.js"],e["./setAsyncStorageItem.js"],e["./shallowCompare.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./uniqueId.js"],e["./uniqueSymbol.js"],e["./useStableState.js"])}(this,((e,t,r,o,a,n,s,u,c,l,i,b,j,S,g,p)=>(()=>{"use strict";var y={352:t=>{t.exports=e},674:e=>{e.exports=t},390:e=>{e.exports=r},104:e=>{e.exports=o},842:e=>{e.exports=a},963:e=>{e.exports=n},433:e=>{e.exports=s},109:e=>{e.exports=u},493:e=>{e.exports=c},664:e=>{e.exports=l},466:e=>{e.exports=i},682:e=>{e.exports=b},286:e=>{e.exports=j},865:e=>{e.exports=S},69:e=>{e.exports=g},503:e=>{e.exports=p}},m={};function f(e){var t=m[e];if(void 0!==t)return t.exports;var r=m[e]={exports:{}};return y[e](r,r.exports,f),r.exports}var d={};return(()=>{var e=d;Object.defineProperty(e,"__esModule",{value:!0}),e.generateStackHash=e.asyncStorageWrapper=e.setAsyncStorageItem=e.getAsyncStorageItem=e.createCustomGlobalState=e.createGlobalState=e.GlobalStoreAbstract=e.GlobalStore=e.createContext=e.useStableState=e.uniqueSymbol=e.isRecord=e.throwWrongKeyOnActionCollectionConfig=e.uniqueId=e.debounce=e.shallowCompare=void 0;var t=f(682);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return t.shallowCompare}});var r=f(433);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return r.debounce}});var o=f(865);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return o.uniqueId}});var a=f(286);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return a.throwWrongKeyOnActionCollectionConfig}});var n=f(664);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return n.isRecord}});var s=f(69);Object.defineProperty(e,"uniqueSymbol",{enumerable:!0,get:function(){return s.uniqueSymbol}});var u=f(503);Object.defineProperty(e,"useStableState",{enumerable:!0,get:function(){return u.useStableState}});var c=f(104);Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return c.createContext}});var l=f(352);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return l.GlobalStore}});var i=f(674);Object.defineProperty(e,"GlobalStoreAbstract",{enumerable:!0,get:function(){return i.GlobalStoreAbstract}});var b=f(963);Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return b.createGlobalState}});var j=f(842);Object.defineProperty(e,"createCustomGlobalState",{enumerable:!0,get:function(){return j.createCustomGlobalState}});var S=f(493);Object.defineProperty(e,"getAsyncStorageItem",{enumerable:!0,get:function(){return S.getAsyncStorageItem}});var g=f(466);Object.defineProperty(e,"setAsyncStorageItem",{enumerable:!0,get:function(){return g.setAsyncStorageItem}});var p=f(390);Object.defineProperty(e,"asyncStorageWrapper",{enumerable:!0,get:function(){return p.asyncStorageWrapper}});var y=f(109);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return y.generateStackHash}})})(),d})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateStackHash, default } from "react-hooks-global-states/generateStackHash";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-hooks-global-states/generateStackHash")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/generateStackHash"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("react-hooks-global-states/generateStackHash")):e["react-native-global-state-hooks"]=t(e["react-hooks-global-states/generateStackHash"])}(this,(e=>(()=>{"use strict";var t={553:t=>{t.exports=e}},a={};function r(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,r),s.exports}var o={};return(()=>{var e=o,t=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.generateStackHash=void 0;var a=r(553);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return a.generateStackHash}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t(a).default}})})(),o})()));
|
package/getAsyncStorageItem.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("./asyncStorageWrapper.js")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js"],r):"object"==typeof exports?exports["react-native-global-state-hooks"]=r(require("./asyncStorageWrapper.js")):t["react-native-global-state-hooks"]=r(t["./asyncStorageWrapper.js"])}(this,(t=>{return r={600:(t,r,e)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return r};var t,r={},e=Object.prototype,i=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function y(t,r,e,n){var o=r&&r.prototype instanceof g?r:g,i=Object.create(o.prototype),u=new k(n||[]);return a(i,"_invoke",{value:L(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=y;var v="suspendedStart",h="suspendedYield",m="executing",d="completed",b={};function g(){}function w(){}function S(){}var j={};s(j,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(M([])));O&&O!==e&&i.call(O,c)&&(j=O);var _=S.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(r){s(t,r,(function(t){return this._invoke(r,t)}))}))}function P(t,r){function e(o,a,u,c){var f=p(t[o],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==n(s)&&i.call(s,"__await")?r.resolve(s.__await).then((function(t){e("next",t,u,c)}),(function(t){e("throw",t,u,c)})):r.resolve(s).then((function(t){l.value=t,u(l)}),(function(t){return e("throw",t,u,c)}))}c(f.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}})}function L(r,e,n){var o=v;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?d:h,f.arg===b)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=d,n.method="throw",n.arg=f.arg)}}}function A(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,A(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,b;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,b):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function F(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function M(r){if(r||""===r){var e=r[c];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(n(r)+" is not iterable")}return w.prototype=S,a(_,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=s(S,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,s(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},r.awrap=function(t){return{__await:t}},E(P.prototype),s(P.prototype,f,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new P(y(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(_),s(_,l,"Generator"),s(_,c,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=M,k.prototype={constructor:k,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),b},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),b}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:M(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}var i=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(a,u)}c((n=n.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.getAsyncStorageItem=void 0;var a=e(390),u=e(129);r.getAsyncStorageItem=function(t){return i(void 0,void 0,void 0,o().mark((function r(){var e,n,i,c,f;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.key){r.next=3;break}return r.abrupt("return",null);case 3:return n="function"==typeof e?e():e,r.next=6,a.asyncStorageWrapper.getItem(n);case 6:if(null!==(i=r.sent)){r.next=9;break}return r.abrupt("return",null);case 9:return c=t.decrypt||t.encrypt?"function"==typeof t.decrypt?t.decrypt(i):atob(i):i,f=(0,u.formatFromStore)(c,{jsonParse:!0}),r.abrupt("return",f);case 12:case"end":return r.stop()}}),r)})))},r.default=r.getAsyncStorageItem},129:function(t){t.exports=(()=>{"use strict";var t={333:(t,r,e)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,r,e){return(r=function(t){var r=function(t,r){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==n(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return a(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0;var u=e(646),c=e(346),f=e(473);r.clone=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,f.isPrimitive)(t)||(0,u.isDate)(t))return t;if(Array.isArray(t))return e?i(t):t.map((function(t){return(0,r.clone)(t)}));if(t instanceof Map){var n=Array.from(t.entries());return e?new Map(n):new Map(n.map((function(t){return(0,r.clone)(t)})))}if(t instanceof Set){var a=Array.from(t.values());return e?new Set(a):new Set(a.map((function(t){return(0,r.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,c.isFunction)(t)?e?t:Object.create(t):e?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(e,n){var i=t[n];return Object.assign(Object.assign({},e),o({},n,(0,r.clone)(i)))}),{})}},944:(t,r,e)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,r,e){return(r=function(t){var r=function(t,r){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==n(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function i(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,u=[],c=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;c=!1}else for(;!(c=(n=i.call(e)).done)&&(u.push(n.value),u.length!==r);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(f)throw o}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return a(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(t,r):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}Object.defineProperty(r,"__esModule",{value:!0}),r.formatFromStore=void 0;var u=e(333),c=e(346),f=e(473);r.formatFromStore=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.jsonParse,a=e.sortKeys;return function(t){var e,n,u;if((0,f.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var l=(null!==(e=t.$v)&&void 0!==e?e:[]).map((function(t){var e=i(t,2),n=e[0],o=e[1];return[n,(0,r.formatFromStore)(o)]}));return new Map(l)}if("set"===(null==t?void 0:t.$t)){var s=null!==(n=t.$v)&&void 0!==n?n:[].map((function(t){return(0,r.formatFromStore)(t)}));return new Set(s)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,r.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):(u=Object.keys(t),a?(0,c.isFunction)(a)?u.sort(a):u.sort((function(t,r){return(null!=t?t:"").localeCompare(r)})):u).reduce((function(e,n){var i=t[n];return Object.assign(Object.assign({},e),o({},n,(0,r.formatFromStore)(i)))}),{})}(n?JSON.parse(t):(0,u.clone)(t))}},112:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isBoolean=void 0,r.isBoolean=function(t){return"boolean"==typeof t}},646:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isDate=void 0,r.isDate=function(t){return t instanceof Date}},346:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=void 0,r.isFunction=function(t){return"function"==typeof t||t instanceof Function}},243:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isNil=void 0,r.isNil=function(t){return null==t}},11:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isNumber=void 0,r.isNumber=function(t){return"number"==typeof t}},473:(t,r,e)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.isPrimitive=void 0;var o=e(112),i=e(243),a=e(11),u=e(671);r.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===n(t)}},671:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isString=void 0,r.isString=function(t){return"string"==typeof t}}},r={};return function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n](i,i.exports,e),i.exports}(944)})()},390:r=>{"use strict";r.exports=t}},e={},function t(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return r[n].call(i.exports,i,i.exports,t),i.exports}(600);var r,e}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatFromStore")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js","json-storage-formatter/formatFromStore"],r):"object"==typeof exports?exports["react-native-global-state-hooks"]=r(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatFromStore")):t["react-native-global-state-hooks"]=r(t["./asyncStorageWrapper.js"],t["json-storage-formatter/formatFromStore"])}(this,((t,r)=>(()=>{"use strict";var e={600:(t,r,e)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return r};var t,r={},e=Object.prototype,a=e.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,a=Object.create(o.prototype),c=new N(n||[]);return i(a,"_invoke",{value:k(t,e,c)}),a}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};l(L,u,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(I([])));S&&S!==e&&a.call(S,u)&&(L=S);var E=x.prototype=w.prototype=Object.create(L);function _(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function O(t,r){function e(o,i,c,u){var f=p(t[o],t,i);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==n(l)&&a.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,c,u)}),(function(t){e("throw",t,c,u)})):r.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return e("throw",t,c,u)}))}u(f.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(a,a):a()}})}function k(r,e,n){var o=y;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=F(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function F(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,F(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,r.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;var i=a.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(r){if(r||""===r){var e=r[u];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function e(){for(;++o<r.length;)if(a.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(n(r)+" is not iterable")}return b.prototype=x,i(E,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},r.awrap=function(t){return{__await:t}},_(O.prototype),l(O.prototype,f,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new O(h(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(E),l(E,s,"Generator"),l(E,u,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=I,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!r)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),f=a.call(i,"finallyLoc");if(u&&f){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:I(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}var a=function(t,r,e,n){return new(e||(e=Promise))((function(o,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(i,c)}u((n=n.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.getAsyncStorageItem=void 0;var i=e(390),c=e(89);r.getAsyncStorageItem=function(t){return a(void 0,void 0,void 0,o().mark((function r(){var e,n,a,u,f;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.key){r.next=3;break}return r.abrupt("return",null);case 3:return n="function"==typeof e?e():e,r.next=6,i.asyncStorageWrapper.getItem(n);case 6:if(null!==(a=r.sent)){r.next=9;break}return r.abrupt("return",null);case 9:return u=t.decrypt||t.encrypt?"function"==typeof t.decrypt?t.decrypt(a):atob(a):a,f=(0,c.formatFromStore)(u,{jsonParse:!0}),r.abrupt("return",f);case 12:case"end":return r.stop()}}),r)})))},r.default=r.getAsyncStorageItem},390:r=>{r.exports=t},89:t=>{t.exports=r}},n={};var o=function t(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(600);return o})()));
|
package/index.d.ts
CHANGED
|
@@ -19,3 +19,4 @@ export { createCustomGlobalState, type CustomCreateGlobalState } from "./createC
|
|
|
19
19
|
export { getAsyncStorageItem } from "./getAsyncStorageItem";
|
|
20
20
|
export { setAsyncStorageItem } from "./setAsyncStorageItem";
|
|
21
21
|
export { asyncStorageWrapper, type AsyncStorageManager } from "./asyncStorageWrapper";
|
|
22
|
+
export { generateStackHash } from "./generateStackHash";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-global-state-hooks",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "This is a package to easily handling global-state across your react-native-components No-redux... The library now includes @react-native-async-storage/async-storage to persist your state across sessions... if you want to keep using the old version without async-storage or react-native dependencies just use version 5.0.15 or user react-hooks-global-states instead",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -169,6 +169,6 @@
|
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
171
|
"dependencies": {
|
|
172
|
-
"react-hooks-global-states": "^7.0.
|
|
172
|
+
"react-hooks-global-states": "^7.0.17"
|
|
173
173
|
}
|
|
174
174
|
}
|
package/setAsyncStorageItem.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js","json-storage-formatter/formatToStore"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):e["react-native-global-state-hooks"]=t(e["./asyncStorageWrapper.js"],e["json-storage-formatter/formatToStore"])}(this,((e,t)=>(()=>{"use strict";var r={305:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setAsyncStorageItem=void 0;var o=r(888),a=r(390);t.setAsyncStorageItem=function(e,t){var r=t.key;if(r){var s="function"==typeof r?r():r,n=(0,o.formatToStore)(e,{stringify:!0,excludeTypes:["function"]}),p=t.encrypt?"function"==typeof t.encrypt?t.encrypt(n):btoa(n):n;a.asyncStorageWrapper.setItem(s,p)}},t.default=t.setAsyncStorageItem},390:t=>{t.exports=e},888:e=>{e.exports=t}},o={};var a=function e(t){var a=o[t];if(void 0!==a)return a.exports;var s=o[t]={exports:{}};return r[t](s,s.exports,e),s.exports}(305);return a})()));
|
package/webpack.config.js
CHANGED
|
@@ -1,68 +1,76 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
3
3
|
|
|
4
|
+
const individualEntries = {
|
|
5
|
+
// inherit from react-global-state-hooks
|
|
6
|
+
createContext: "./src/createContext.ts",
|
|
7
|
+
GlobalStore: "./src/GlobalStore.ts",
|
|
8
|
+
GlobalStoreAbstract: "./src/GlobalStoreAbstract.ts",
|
|
9
|
+
createCustomGlobalState: "./src/createCustomGlobalState.ts",
|
|
10
|
+
createGlobalState: "./src/createGlobalState.ts",
|
|
11
|
+
types: "./src/types.ts",
|
|
12
|
+
debounce: "./src/debounce.ts",
|
|
13
|
+
isRecord: "./src/isRecord.ts",
|
|
14
|
+
shallowCompare: "./src/shallowCompare.ts",
|
|
15
|
+
throwWrongKeyOnActionCollectionConfig: "./src/throwWrongKeyOnActionCollectionConfig.ts",
|
|
16
|
+
uniqueId: "./src/uniqueId.ts",
|
|
17
|
+
uniqueSymbol: "./src/uniqueSymbol.ts",
|
|
18
|
+
useStableState: "./src/useStableState.ts",
|
|
19
|
+
generateStackHash: "./src/generateStackHash.ts",
|
|
20
|
+
|
|
21
|
+
// extras
|
|
22
|
+
asyncStorageWrapper: "./src/asyncStorageWrapper.ts",
|
|
23
|
+
getAsyncStorageItem: "./src/getAsyncStorageItem.ts",
|
|
24
|
+
setAsyncStorageItem: "./src/setAsyncStorageItem.ts",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const getExternalsForEntries = () => {
|
|
28
|
+
const keys = Object.keys(individualEntries);
|
|
29
|
+
const fromEntries = keys.reduce((acc, key) => {
|
|
30
|
+
acc[`./${key}`] = `./${key}.js`;
|
|
31
|
+
return acc;
|
|
32
|
+
}, {});
|
|
33
|
+
|
|
34
|
+
const fromBasePackage = keys.reduce((acc, key) => {
|
|
35
|
+
acc[`react-hooks-global-states/${key}`] = `react-hooks-global-states/${key}`;
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
...fromEntries,
|
|
41
|
+
...fromBasePackage,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
4
45
|
module.exports = {
|
|
5
46
|
mode: "production",
|
|
6
47
|
entry: {
|
|
7
|
-
// inherit from react-global-state-hooks
|
|
8
48
|
bundle: "./src/index.ts",
|
|
9
|
-
|
|
10
|
-
GlobalStore: "./src/GlobalStore.ts",
|
|
11
|
-
GlobalStoreAbstract: "./src/GlobalStoreAbstract.ts",
|
|
12
|
-
createCustomGlobalState: "./src/createCustomGlobalState.ts",
|
|
13
|
-
createGlobalState: "./src/createGlobalState.ts",
|
|
14
|
-
types: "./src/types.ts",
|
|
15
|
-
debounce: "./src/debounce.ts",
|
|
16
|
-
isRecord: "./src/isRecord.ts",
|
|
17
|
-
shallowCompare: "./src/shallowCompare.ts",
|
|
18
|
-
throwWrongKeyOnActionCollectionConfig: "./src/throwWrongKeyOnActionCollectionConfig.ts",
|
|
19
|
-
uniqueId: "./src/uniqueId.ts",
|
|
20
|
-
uniqueSymbol: "./src/uniqueSymbol.ts",
|
|
21
|
-
useStableState: "./src/useStableState.ts",
|
|
22
|
-
// extras
|
|
23
|
-
asyncStorageWrapper: "./src/asyncStorageWrapper.ts",
|
|
24
|
-
getAsyncStorageItem: "./src/getAsyncStorageItem.ts",
|
|
25
|
-
setAsyncStorageItem: "./src/setAsyncStorageItem.ts",
|
|
49
|
+
...individualEntries,
|
|
26
50
|
},
|
|
27
51
|
externals: {
|
|
28
52
|
react: "react",
|
|
29
53
|
"react-native": "react-native",
|
|
30
54
|
"@react-native-async-storage/async-storage": "@react-native-async-storage/async-storage",
|
|
55
|
+
|
|
31
56
|
// avoid bundle the base package
|
|
57
|
+
"json-storage-formatter": "json-storage-formatter",
|
|
58
|
+
"json-storage-formatter/clone": "json-storage-formatter/clone",
|
|
59
|
+
"json-storage-formatter/isNil": "json-storage-formatter/isNil",
|
|
60
|
+
"json-storage-formatter/isNumber": "json-storage-formatter/isNumber",
|
|
61
|
+
"json-storage-formatter/isBoolean": "json-storage-formatter/isBoolean",
|
|
62
|
+
"json-storage-formatter/isString": "json-storage-formatter/isString",
|
|
63
|
+
"json-storage-formatter/isDate": "json-storage-formatter/isDate",
|
|
64
|
+
"json-storage-formatter/isRegex": "json-storage-formatter/isRegex",
|
|
65
|
+
"json-storage-formatter/isFunction": "json-storage-formatter/isFunction",
|
|
66
|
+
"json-storage-formatter/isPrimitive": "json-storage-formatter/isPrimitive",
|
|
67
|
+
"json-storage-formatter/types": "json-storage-formatter/types",
|
|
68
|
+
"json-storage-formatter/formatFromStore": "json-storage-formatter/formatFromStore",
|
|
69
|
+
"json-storage-formatter/formatToStore": "json-storage-formatter/formatToStore",
|
|
70
|
+
|
|
32
71
|
"react-hooks-global-states": "react-hooks-global-states",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"react-hooks-global-states/GlobalStoreAbstract": "react-hooks-global-states/GlobalStoreAbstract",
|
|
36
|
-
"react-hooks-global-states/createCustomGlobalState": "react-hooks-global-states/createCustomGlobalState",
|
|
37
|
-
"react-hooks-global-states/createGlobalState": "react-hooks-global-states/createGlobalState",
|
|
38
|
-
"react-hooks-global-states/types": "react-hooks-global-states/types",
|
|
39
|
-
"react-hooks-global-states/debounce": "react-hooks-global-states/debounce",
|
|
40
|
-
"react-hooks-global-states/isRecord": "react-hooks-global-states/isRecord",
|
|
41
|
-
"react-hooks-global-states/shallowCompare": "react-hooks-global-states/shallowCompare",
|
|
42
|
-
"react-hooks-global-states/throwWrongKeyOnActionCollectionConfig":
|
|
43
|
-
"react-hooks-global-states/throwWrongKeyOnActionCollectionConfig",
|
|
44
|
-
"react-hooks-global-states/uniqueId": "react-hooks-global-states/uniqueId",
|
|
45
|
-
"react-hooks-global-states/uniqueSymbol": "react-hooks-global-states/uniqueSymbol",
|
|
46
|
-
"react-hooks-global-states/useStableState": "react-hooks-global-states/useStableState",
|
|
47
|
-
"react-hooks-global-states/generateStackHash": "react-hooks-global-states/generateStackHash",
|
|
48
|
-
// inherit from react-global-state-hooks
|
|
49
|
-
"./createContext": "./createContext.js",
|
|
50
|
-
"./GlobalStore": "./GlobalStore.js",
|
|
51
|
-
"./GlobalStoreAbstract": "./GlobalStoreAbstract.js",
|
|
52
|
-
"./createCustomGlobalState": "./createCustomGlobalState.js",
|
|
53
|
-
"./createGlobalState": "./createGlobalState.js",
|
|
54
|
-
"./types": "./types.js",
|
|
55
|
-
"./debounce": "./debounce.js",
|
|
56
|
-
"./isRecord": "./isRecord.js",
|
|
57
|
-
"./shallowCompare": "./shallowCompare.js",
|
|
58
|
-
"./throwWrongKeyOnActionCollectionConfig": "./throwWrongKeyOnActionCollectionConfig.js",
|
|
59
|
-
"./uniqueId": "./uniqueId.js",
|
|
60
|
-
"./uniqueSymbol": "./uniqueSymbol.js",
|
|
61
|
-
"./useStableState": "./useStableState.js",
|
|
62
|
-
// extras
|
|
63
|
-
"./asyncStorageWrapper": "./asyncStorageWrapper.js",
|
|
64
|
-
"./getAsyncStorageItem": "./getAsyncStorageItem.js",
|
|
65
|
-
"./setAsyncStorageItem": "./setAsyncStorageItem.js",
|
|
72
|
+
|
|
73
|
+
...getExternalsForEntries(),
|
|
66
74
|
},
|
|
67
75
|
output: {
|
|
68
76
|
path: path.resolve(__dirname),
|