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

react-reducer-ssr

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-reducer-ssr - npm Package Compare versions

Comparing version 0.6.11 to 0.6.12

2

dist/index.cjs.js

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

"use strict";var t=require("react"),r=require("react/jsx-runtime");function e(t){}function n(t){return t&&"function"==typeof t.then}function o(t,r){return function(e){return new Promise((function(o,u){n(e)?e.then((function(e){i(e,t,r,o,u)})).catch((function(t){return u(t)})):i(e,t,r,o,u)}))}}function i(t,r,e,o,i){if("function"==typeof t){var u=t(r,{},e);n(u)?u.then((function(t){o()})).catch((function(t){return i(t)})):o()}else r(t),o()}function u(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,u,c=[],a=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r);else for(;!(a=(n=i.call(e)).done)&&(c.push(n.value),c.length!==r);a=!0);}catch(t){f=!0,o=t}finally{try{if(!a&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return c}}(t,r)||function(t,r){if(t){if("string"==typeof t)return c(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)?c(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 c(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}var a=t.createContext(null),f=t.createContext(null);function l(t){return l="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},l(t)}function s(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function p(t,r,e){return(r=function(t){var r=function(t,r){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==l(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}exports.NullDispatch=e,exports.RootContextProvider=function(e){var n=e.children,i=e.reducer,c=e.customParams,l=e.initialState,s=u(t.useReducer(i,l||i(l,{type:"@@INIT"})),2),p=s[0],y=s[1];return r.jsx(a.Provider,{value:p,children:r.jsx(f.Provider,{value:o(y,c),children:n})})},exports.combineReducers=function(t){return function(r,e){r=r||{};var n=!1;return Object.keys(t).forEach((function(o){var i=t[o];if(i){var u=i(r[o]||{},e);u!==r[o]&&(r[o]=u,n=!0)}})),n?function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?s(Object(e),!0).forEach((function(r){p(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({},r):r}},exports.createServerStore=function(t,r,e){var n={root:e||{},dispatch:o((function(r){n.root=t(n.root,r)}),r)};return e||n.dispatch({type:"@@INIT"}),n},exports.isPromise=n,exports.useStateDispatch=function(){return t.useContext(f)||e},exports.useStateSelectorT=function(r){var e=t.useContext(a);return r&&e?r(e):e},exports.wrapDispatchWithAsync=o;
"use strict";var t=require("react"),r=require("react/jsx-runtime");function e(t){}function n(t){return t&&"function"==typeof t.then}function o(t,r){return function(e){return new Promise((function(o,u){n(e)?e.then((function(e){i(e,t,r,o,u)})).catch((function(t){return u(t)})):i(e,t,r,o,u)}))}}function i(t,r,e,o,i){if("function"==typeof t){var u=t(r,{},e);n(u)?u.then((function(t){o()})).catch((function(t){return i(t)})):o()}else r(t),o()}function u(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,u,c=[],a=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r);else for(;!(a=(n=i.call(e)).done)&&(c.push(n.value),c.length!==r);a=!0);}catch(t){f=!0,o=t}finally{try{if(!a&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return c}}(t,r)||function(t,r){if(t){if("string"==typeof t)return c(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)?c(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 c(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}var a=t.createContext(null),f=t.createContext(null);function l(t){return l="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},l(t)}function s(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function p(t,r,e){return(r=function(t){var r=function(t,r){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==l(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}exports.NullDispatch=e,exports.RootContextProvider=function(e){var n=e.children,i=e.reducer,c=e.customParams,l=e.initialState,s=u(t.useReducer(i,l||i(l,{type:"@@INIT"})),2),p=s[0],y=s[1],b=t.useMemo((function(){return o(y,c)}),[y,c]);return r.jsx(a.Provider,{value:p,children:r.jsx(f.Provider,{value:b,children:n})})},exports.combineReducers=function(t){return function(r,e){r=r||{};var n=!1;return Object.keys(t).forEach((function(o){var i=t[o];if(i){var u=i(r[o]||{},e);u!==r[o]&&(r[o]=u,n=!0)}})),n?function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?s(Object(e),!0).forEach((function(r){p(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({},r):r}},exports.createServerStore=function(t,r,e){var n={root:e||{},dispatch:o((function(r){n.root=t(n.root,r)}),r)};return e||n.dispatch({type:"@@INIT"}),n},exports.isPromise=n,exports.useStateDispatch=function(){return t.useContext(f)||e},exports.useStateSelectorT=function(r){var e=t.useContext(a);return r&&e?r(e):e},exports.wrapDispatchWithAsync=o;

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

import{useReducer as t,useContext as r,createContext as n}from"react";import{jsx as e}from"react/jsx-runtime";function o(t,r,n){var e={root:n||{},dispatch:c((function(r){e.root=t(e.root,r)}),r)};return n||e.dispatch({type:"@@INIT"}),e}function i(t){}function u(t){return t&&"function"==typeof t.then}function c(t,r){return function(n){return new Promise((function(e,o){u(n)?n.then((function(n){f(n,t,r,e,o)})).catch((function(t){return o(t)})):f(n,t,r,e,o)}))}}function f(t,r,n,e,o){if("function"==typeof t){var i=t(r,{},n);u(i)?i.then((function(t){e()})).catch((function(t){return o(t)})):e()}else r(t),e()}function a(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i,u,c=[],f=!0,a=!1;try{if(i=(n=n.call(t)).next,0===r);else for(;!(f=(e=i.call(n)).done)&&(c.push(e.value),c.length!==r);f=!0);}catch(t){a=!0,o=t}finally{try{if(!f&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(a)throw o}}return c}}(t,r)||function(t,r){if(t){if("string"==typeof t)return l(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(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 l(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=Array(r);n<r;n++)e[n]=t[n];return e}var y=n(null),p=n(null);function b(r){var n=r.children,o=r.reducer,i=r.customParams,u=r.initialState,f=a(t(o,u||o(u,{type:"@@INIT"})),2),l=f[0],b=f[1];return e(y.Provider,{value:l,children:e(p.Provider,{value:c(b,i),children:n})})}function s(t){var n=r(y);return t&&n?t(n):n}function m(){return r(p)||i}function v(t){return v="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},v(t)}function h(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function d(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=v(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,r||"default");if("object"!=v(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==v(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function O(t){return function(r,n){r=r||{};var e=!1;return Object.keys(t).forEach((function(o){var i=t[o];if(i){var u=i(r[o]||{},n);u!==r[o]&&(r[o]=u,e=!0)}})),e?function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){d(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}({},r):r}}export{i as NullDispatch,b as RootContextProvider,O as combineReducers,o as createServerStore,u as isPromise,m as useStateDispatch,s as useStateSelectorT,c as wrapDispatchWithAsync};
import{useReducer as t,useMemo as r,useContext as n,createContext as e}from"react";import{jsx as o}from"react/jsx-runtime";function i(t,r,n){var e={root:n||{},dispatch:f((function(r){e.root=t(e.root,r)}),r)};return n||e.dispatch({type:"@@INIT"}),e}function u(t){}function c(t){return t&&"function"==typeof t.then}function f(t,r){return function(n){return new Promise((function(e,o){c(n)?n.then((function(n){a(n,t,r,e,o)})).catch((function(t){return o(t)})):a(n,t,r,e,o)}))}}function a(t,r,n,e,o){if("function"==typeof t){var i=t(r,{},n);c(i)?i.then((function(t){e()})).catch((function(t){return o(t)})):e()}else r(t),e()}function l(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i,u,c=[],f=!0,a=!1;try{if(i=(n=n.call(t)).next,0===r);else for(;!(f=(e=i.call(n)).done)&&(c.push(e.value),c.length!==r);f=!0);}catch(t){a=!0,o=t}finally{try{if(!f&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(a)throw o}}return c}}(t,r)||function(t,r){if(t){if("string"==typeof t)return y(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(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 y(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=Array(r);n<r;n++)e[n]=t[n];return e}var p=e(null),b=e(null);function s(n){var e=n.children,i=n.reducer,u=n.customParams,c=n.initialState,a=l(t(i,c||i(c,{type:"@@INIT"})),2),y=a[0],s=a[1],m=r((function(){return f(s,u)}),[s,u]);return o(p.Provider,{value:y,children:o(b.Provider,{value:m,children:e})})}function m(t){var r=n(p);return t&&r?t(r):r}function v(){return n(b)||u}function h(t){return h="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},h(t)}function d(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function O(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,r||"default");if("object"!=h(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==h(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function j(t){return function(r,n){r=r||{};var e=!1;return Object.keys(t).forEach((function(o){var i=t[o];if(i){var u=i(r[o]||{},n);u!==r[o]&&(r[o]=u,e=!0)}})),e?function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){O(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}({},r):r}}export{u as NullDispatch,s as RootContextProvider,j as combineReducers,i as createServerStore,c as isPromise,v as useStateDispatch,m as useStateSelectorT,f as wrapDispatchWithAsync};
{
"name": "react-reducer-ssr",
"version": "0.6.11",
"version": "0.6.12",
"homepage": "https://github.com/alfed7/react-reducer-ssr",

@@ -5,0 +5,0 @@ "repository": "https://github.com/alfed7/react-reducer-ssr",

@@ -0,0 +0,0 @@ # React Reducer SSR Documentation

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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