Socket
Socket
Sign inDemoInstall

react-mobile-app

Package Overview
Dependencies
7
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

2

lib/index.js

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

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("react-mobile-app",[],n):"object"==typeof exports?exports["react-mobile-app"]=n():t["react-mobile-app"]=n()}(global,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="tjUo")}({A1cq:function(t,n){t.exports=require("mobile-detect")},cDcd:function(t,n){t.exports=require("react")},tjUo:function(t,n,e){"use strict";e.r(n);var r=e("cDcd"),o=e.n(r),i=e("A1cq"),u=new(e.n(i).a)(navigator.userAgent),a=function(){return Boolean(u.mobile())},c=function(){return Boolean(u.tablet())},f=function(){return window.matchMedia("(orientation: landscape)")},l=function(){return f().matches};function s(t){return(s="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})(t)}function p(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,n){return!n||"object"!==s(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,n){return(b=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}var h=function(t){function n(t){var e;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(e=d(this,v(n).call(this,t))).orientationWatcher=void 0,e.isCancelled=void 0,e.orientationChangedHandler=function(){!e.isCancelled&&e.setState({isLandscape:l()})},e.state={isLandscape:l()},e.orientationWatcher=f(),e}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&b(t,n)}(n,r["Component"]),function(t,n,e){n&&y(t.prototype,n),e&&y(t,e)}(n,[{key:"componentWillUnmount",value:function(){this.isCancelled=!0,this.orientationWatcher.removeListener(this.orientationChangedHandler)}},{key:"componentDidMount",value:function(){this.orientationWatcher.addListener(this.orientationChangedHandler)}},{key:"getComponentByDevice",value:function(t){var n=p(t,2),e=n[0],r=n[1];return this.state.isLandscape?r:e}},{key:"render",value:function(){var t=this.getComponentByDevice(this.props.components);return o.a.createElement(t,this.props)}}]),n}();function m(){return(m=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function g(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var w=function(t){var n=g(t,2),e=n[0],r=n[1];return function(t){return o.a.createElement(h,m({},t,{components:[e,r]}))}};function j(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var O=function(t){var n=j(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1];return e?r?w([e,r]):e:t};function x(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var S=function(t){var n=x(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1],o=x(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],2),i=o[0],u=o[1];return a()?O(t,[e,r]):c()?function(t){var n=j(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1],o=j(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],2),i=o[0],u=o[1];return i?u?w([i,u]):i:O(t,[e,r])}(t,[e,r],[i,u]):t};e.d(n,"mobileDetector",function(){return S}),e.d(n,"isMobile",function(){return a}),e.d(n,"isTablet",function(){return c}),e.d(n,"matchMediaQuery",function(){return f}),e.d(n,"isLandscape",function(){return l}),e.d(n,"mobileDetect",function(){return u})}})});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("react-mobile-app",[],n):"object"==typeof exports?exports["react-mobile-app"]=n():t["react-mobile-app"]=n()}(global,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="tjUo")}({A1cq:function(t,n){t.exports=require("mobile-detect")},cDcd:function(t,n){t.exports=require("react")},tjUo:function(t,n,e){"use strict";e.r(n);var r=e("cDcd"),o=e.n(r),i=e("A1cq"),u=new(e.n(i).a)(navigator.userAgent),a=function(){return Boolean(u.mobile())},c=function(){return Boolean(u.tablet())},f=function(){return window.matchMedia("(orientation: landscape)")},l=function(){return f().matches};function s(t){return(s="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})(t)}function p(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,n){return!n||"object"!==s(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,n){return(b=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}var h=function(t){function n(t){var e;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(e=d(this,v(n).call(this,t))).orientationWatcher=void 0,e.isCancelled=void 0,e.orientationChangedHandler=function(){!e.isCancelled&&e.setState({isLandscape:l()})},e.state={isLandscape:l()},e.orientationWatcher=f(),e}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&b(t,n)}(n,r["Component"]),function(t,n,e){n&&y(t.prototype,n),e&&y(t,e)}(n,[{key:"componentWillUnmount",value:function(){this.isCancelled=!0,this.orientationWatcher.removeListener(this.orientationChangedHandler)}},{key:"componentDidMount",value:function(){this.orientationWatcher.addListener(this.orientationChangedHandler)}},{key:"getComponentByDevice",value:function(t){var n=p(t,2),e=n[0],r=n[1];return this.state.isLandscape?r:e}},{key:"render",value:function(){var t=this.getComponentByDevice(this.props.components);return o.a.createElement(t,this.props)}}]),n}();function m(){return(m=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function g(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var j=function(t,n){return n?function(t){var n=g(t,2),e=n[0],r=n[1];return function(t){return o.a.createElement(h,m({},t,{components:[e,r]}))}}([t,n]):t},O=function(t){var n=w(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1];return e?j(e,r):t};function x(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var S=j,_=function(t){var n=x(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1],o=x(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],2),i=o[0],u=o[1];return a()?O(t,[e,r]):c()?function(t){var n=w(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),e=n[0],r=n[1],o=w(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],2),i=o[0],u=o[1];return i?j(i,u):O(t,[e,r])}(t,[e,r],[i,u]):t};e.d(n,"mobileDetector",function(){return _}),e.d(n,"orientationDetector",function(){return S}),e.d(n,"isMobile",function(){return a}),e.d(n,"isTablet",function(){return c}),e.d(n,"matchMediaQuery",function(){return f}),e.d(n,"isLandscape",function(){return l}),e.d(n,"mobileDetect",function(){return u})}})});
{
"name": "react-mobile-app",
"version": "2.0.2",
"version": "2.0.3",
"description": "Tool which help to create clear mobile architecture in react.js",

@@ -12,3 +12,3 @@ "main": "lib/index.js",

"test": "npx jest -u",
"prepublishOnly": "npm test && npx eslint 'src/**/*.js' && npx flow check"
"prepublishOnly": "npm test && npx eslint 'src/**/*.js' && npx flow check && npm run build"
},

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

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