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

@rematch/loading

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rematch/loading - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

dist/rematch-loading.cjs.js

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

"use strict";function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}Object.defineProperty(exports,"__esModule",{value:!0});var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},lib=createCommonjsModule(function(e,t){var n=commonjsGlobal&&commonjsGlobal.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return function(t,o){var i=o.name;return n({},t,{effects:n({},t.effects,(r={},r[i]=n({},t.effects[i],(a={},a[o.action]=e,a)),r)),global:e,models:n({},t.models,(l={},l[i]=e,l))});var r,a,l}};t.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:o(!1),show:o(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(o){var i=o.dispatch;return{onModel:function(o){var r=o.name;r!==t&&(n.state.models[r]=!1,n.state.effects[r]={},Object.keys(i[r]).forEach(function(t){if(i[r][t].isEffect){if(e.whitelist&&!e.whitelist.includes(r+"/"+t))return;if(e.blacklist&&e.blacklist.includes(r+"/"+t))return;n.state.effects[r][t]=!1;var o=i[r][t];i[r][t]=function(e){return i.loading.show({name:r,action:t}),o(e).catch(function(){return i.loading.hide({name:r,action:t})}).then(function(){return i.loading.hide({name:r,action:t})})}}else n.state.models[r]=!1}))}}}}}}),index=unwrapExports(lib);exports.default=index;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var lib=createCommonjsModule(function(e,t){var n=commonjsGlobal&&commonjsGlobal.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function l(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(i,l)}s((o=o.apply(e,t||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(e,t){var n,o,r,a,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(r=o[2&a[0]?"return":a[0]?"throw":"next"])&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[0,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,o=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=(r=i.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&r[3]>a[1])){i.label=a[1];break}if(6===a[0]&&r[1]>i.label){i.label=r[1],r=a;break}if(r&&r[2]>i.label){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){return function(t,o){var r,a,i,l=o.name;return n({},t,{effects:n({},t.effects,(r={},r[l]=n({},t.effects[l],(a={},a[o.action]=e,a)),r)),global:e,models:n({},t.models,(i={},i[l]=e,i))})}};t.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:a(!1),show:a(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(a){var i=a.dispatch;return{onModel:function(a){var l=this,s=a.name;s!==t&&(n.state.models[s]=!1,n.state.effects[s]={},Object.keys(i[s]).forEach(function(t){if(i[s][t].isEffect){if(e.whitelist&&!e.whitelist.includes(s+"/"+t))return;if(e.blacklist&&e.blacklist.includes(s+"/"+t))return;n.state.effects[s][t]=!1;var a=i[s][t];i[s][t]=function(e){return o(l,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),i.loading.show({name:s,action:t}),[4,a(e)];case 1:case 2:return n.sent(),i.loading.hide({name:s,action:t}),[3,3];case 3:return[2]}})})}}else n.state.models[s]=!1}))}}}}}}),index=unwrapExports(lib);exports.default=index;
//# sourceMappingURL=rematch-loading.cjs.js.map

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

function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},lib=createCommonjsModule(function(e,t){var n=commonjsGlobal&&commonjsGlobal.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return function(t,o){var i=o.name;return n({},t,{effects:n({},t.effects,(r={},r[i]=n({},t.effects[i],(a={},a[o.action]=e,a)),r)),global:e,models:n({},t.models,(l={},l[i]=e,l))});var r,a,l}};t.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:o(!1),show:o(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(o){var i=o.dispatch;return{onModel:function(o){var r=o.name;r!==t&&(n.state.models[r]=!1,n.state.effects[r]={},Object.keys(i[r]).forEach(function(t){if(i[r][t].isEffect){if(e.whitelist&&!e.whitelist.includes(r+"/"+t))return;if(e.blacklist&&e.blacklist.includes(r+"/"+t))return;n.state.effects[r][t]=!1;var o=i[r][t];i[r][t]=function(e){return i.loading.show({name:r,action:t}),o(e).catch(function(){return i.loading.hide({name:r,action:t})}).then(function(){return i.loading.hide({name:r,action:t})})}}else n.state.models[r]=!1}))}}}}}}),index=unwrapExports(lib);export default index;
var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var lib=createCommonjsModule(function(e,t){var n=commonjsGlobal&&commonjsGlobal.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function l(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(i,l)}s((o=o.apply(e,t||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(e,t){var n,o,r,a,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(r=o[2&a[0]?"return":a[0]?"throw":"next"])&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[0,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,o=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=(r=i.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&r[3]>a[1])){i.label=a[1];break}if(6===a[0]&&r[1]>i.label){i.label=r[1],r=a;break}if(r&&r[2]>i.label){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){return function(t,o){var r,a,i,l=o.name;return n({},t,{effects:n({},t.effects,(r={},r[l]=n({},t.effects[l],(a={},a[o.action]=e,a)),r)),global:e,models:n({},t.models,(i={},i[l]=e,i))})}};t.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:a(!1),show:a(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(a){var i=a.dispatch;return{onModel:function(a){var l=this,s=a.name;s!==t&&(n.state.models[s]=!1,n.state.effects[s]={},Object.keys(i[s]).forEach(function(t){if(i[s][t].isEffect){if(e.whitelist&&!e.whitelist.includes(s+"/"+t))return;if(e.blacklist&&e.blacklist.includes(s+"/"+t))return;n.state.effects[s][t]=!1;var a=i[s][t];i[s][t]=function(e){return o(l,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),i.loading.show({name:s,action:t}),[4,a(e)];case 1:case 2:return n.sent(),i.loading.hide({name:s,action:t}),[3,3];case 3:return[2]}})})}}else n.state.models[s]=!1}))}}}}}}),index=unwrapExports(lib);export default index;
//# sourceMappingURL=rematch-loading.esm.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RematchLoading={})}(this,function(e){"use strict";var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e,n){var i=t&&t.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;i>n;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(n,"__esModule",{value:!0});var o=function(e){return function(t,n){var o=n.name;return i({},t,{effects:i({},t.effects,(r={},r[o]=i({},t.effects[o],(a={},a[n.action]=e,a)),r)),global:e,models:i({},t.models,(s={},s[o]=e,s))});var r,a,s}};n.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:o(!1),show:o(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(i){var o=i.dispatch;return{onModel:function(i){var r=i.name;r!==t&&(n.state.models[r]=!1,n.state.effects[r]={},Object.keys(o[r]).forEach(function(t){if(o[r][t].isEffect){if(e.whitelist&&!e.whitelist.includes(r+"/"+t))return;if(e.blacklist&&e.blacklist.includes(r+"/"+t))return;n.state.effects[r][t]=!1;var i=o[r][t];o[r][t]=function(e){return o.loading.show({name:r,action:t}),i(e).catch(function(){return o.loading.hide({name:r,action:t})}).then(function(){return o.loading.hide({name:r,action:t})})}}else n.state.models[r]=!1}))}}}}}}));e.default=n,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RematchLoading={})}(this,function(e){"use strict";var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n,r,o=(function(e,n){var r=t&&t.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},o=t&&t.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,l)}s((r=r.apply(e,t||[])).next())})},i=t&&t.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&o[3]>i[1])){a.label=i[1];break}if(6===i[0]&&o[1]>a.label){a.label=o[1],o=i;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=function(e){return function(t,n){var o,i,a,l=n.name;return r({},t,{effects:r({},t.effects,(o={},o[l]=r({},t.effects[l],(i={},i[n.action]=e,i)),o)),global:e,models:r({},t.models,(a={},a[l]=e,a))})}};n.default=function(e){if(void 0===e&&(e={}),e.name&&"string"!=typeof e.name)throw Error("loading plugin config name must be a string");if(e.whitelist&&!Array.isArray(e.whitelist))throw Error("loading plugin config whitelist must be an array of strings");if(e.blacklist&&!Array.isArray(e.blacklist))throw Error("loading plugin config blacklist must be an array of strings");if(e.whitelist&&e.blacklist)throw Error("loading plugin config cannot have both a whitelist & a blacklist");var t=e.name||"loading",n={name:t,reducers:{hide:a(!1),show:a(!0)},state:{effects:{},global:!1,models:{}}};return{config:{models:{loading:n}},init:function(r){var a=r.dispatch;return{onModel:function(r){var l=this,s=r.name;s!==t&&(n.state.models[s]=!1,n.state.effects[s]={},Object.keys(a[s]).forEach(function(t){if(a[s][t].isEffect){if(e.whitelist&&!e.whitelist.includes(s+"/"+t))return;if(e.blacklist&&e.blacklist.includes(s+"/"+t))return;n.state.effects[s][t]=!1;var r=a[s][t];a[s][t]=function(e){return o(l,void 0,void 0,function(){return i(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),a.loading.show({name:s,action:t}),[4,r(e)];case 1:case 2:return n.sent(),a.loading.hide({name:s,action:t}),[3,3];case 3:return[2]}})})}}else n.state.models[s]=!1}))}}}}}}(n={exports:{}},n.exports),n.exports),i=(r=o)&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;e.default=i,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=rematch-loading.umd.js.map
{
"name": "@rematch/loading",
"version": "0.3.1",
"version": "0.3.2",
"description": "Loading indicator plugin for Rematch",

@@ -25,11 +25,11 @@ "keywords": [

"scripts": {
"build": "rimraf build dist && tsc && NODE_ENV='production' rollup -c"
"build": "rimraf build dist && tsc && NODE_ENV=production rollup -c"
},
"devDependencies": {
"redux": "^3.0.0",
"@rematch/core": "^0.1.1"
"@rematch/core": "^0.1.3"
},
"peerDependencies": {
"@rematch/core": "^0.1.1"
"@rematch/core": "^0.1.3"
}
}

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