Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-ua

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ua - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/react-ua.js

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

function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("react"),n=e(r),t=e(require("ua-parser-js"));var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;var u=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var n,t,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var f in n=Object(arguments[c]))a.call(n,f)&&(u[f]=n[f]);if(o){t=o(n);for(var p=0;p<t.length;p++)i.call(n,t[p])&&(u[t[p]]=n[t[p]])}}return u},c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",f=function(){};if("production"!==process.env.NODE_ENV){var p=c,s={};f=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}var l=function(e,r,n,t,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(e.hasOwnProperty(a)){var i;try{if("function"!=typeof e[a]){var u=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](r,a,t,n,null,p)}catch(e){i=e}if(!i||i instanceof Error||f((t||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in s)){s[i.message]=!0;var c=o?o():"";f("Failed "+n+" type: "+i.message+(null!=c?c:""))}}},y=function(){};function d(){return null}"production"!==process.env.NODE_ENV&&(y=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}});var v=function(e,r){var n="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var o="<<anonymous>>",a={array:s("array"),bool:s("boolean"),func:s("function"),number:s("number"),object:s("object"),string:s("string"),symbol:s("symbol"),any:p(d),arrayOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=r[n];if(!Array.isArray(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an array.")}for(var p=0;p<i.length;p++){var s=e(i,p,t,o,a+"["+p+"]",c);if(s instanceof Error)return s}return null})},element:function(){return p(function(r,n,t,o,a){var i=r[n];if(!e(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return p(function(r,n,t,a,i){if(!(r[n]instanceof e)){var u=e.name||o,c=function(e){if(!e.constructor||!e.constructor.name)return o;return e.constructor.name}(r[n]);return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+t+"`, expected instance of `"+u+"`.")}return null})},node:function(){return p(function(e,r,n,t,o){if(!v(e[r]))return new f("Invalid "+t+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an object.");for(var p in i)if(i.hasOwnProperty(p)){var s=e(i,p,t,o,a+"."+p,c);if(s instanceof Error)return s}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOf, expected an instance of array."),d;return p(function(r,n,t,o,a){for(var u=r[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var p=JSON.stringify(e);return new f("Invalid "+o+" `"+a+"` of value `"+u+"` supplied to `"+t+"`, expected one of "+p+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var r=0;r<e.length;r++){var n=e[r];if("function"!=typeof n)return y("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+r+"."),d}return p(function(r,n,t,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(r,n,t,o,a,c))return null}return new f("Invalid "+o+" `"+a+"` supplied to `"+t+"`.")})},shape:function(e){return p(function(r,n,t,o,a){var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected `object`.");for(var p in e){var s=e[p];if(s){var l=s(i,p,t,o,a+"."+p,c);if(l)return l}}return null})},exact:function(e){return p(function(r,n,t,o,a){var i=r[n],p=b(i);if("object"!==p)return new f("Invalid "+o+" `"+a+"` of type `"+p+"` supplied to `"+t+"`, expected `object`.");var s=u({},r[n],e);for(var l in s){var y=e[l];if(!y)return new f("Invalid "+o+" `"+a+"` key `"+l+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=y(i,l,t,o,a+"."+l,c);if(d)return d}return null})}};function i(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function f(e){this.message=e,this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var n={},t=0;function a(a,i,u,p,s,l,d){if(p=p||o,l=l||u,d!==c){if(r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=p+":"+u;!n[b]&&t<3&&(y("You are manually calling a React.PropTypes validation function for the `"+l+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[b]=!0,t++)}}return null==i[u]?a?new f(null===i[u]?"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(i,u,p,s,l)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function s(e){return p(function(r,n,t,o,a,i){var u=r[n];return b(u)!==e?new f("Invalid "+o+" `"+a+"` of type `"+h(u)+"` supplied to `"+t+"`, expected `"+e+"`."):null})}function v(r){switch(typeof r){case"number":case"string":case"undefined":return!0;case"boolean":return!r;case"object":if(Array.isArray(r))return r.every(v);if(null===r||e(r))return!0;var o=function(e){var r=e&&(n&&e[n]||e[t]);if("function"==typeof r)return r}(r);if(!o)return!1;var a,i=o.call(r);if(o!==r.entries){for(;!(a=i.next()).done;)if(!v(a.value))return!1}else for(;!(a=i.next()).done;){var u=a.value;if(u&&!v(u[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||"Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol}(r,e)?"symbol":r}function h(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function m(e){var r=h(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return f.prototype=Error.prototype,a.checkPropTypes=l,a.PropTypes=a,a};function b(){}var h=function(e,r){return e(r={exports:{}},r.exports),r.exports}(function(e){if("production"!==process.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=v(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},!0)}else e.exports=function(){function e(e,r,n,t,o,a){if(a!==c){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return n.checkPropTypes=b,n.PropTypes=n,n}()}),m=n.createContext(),O=m.Consumer;(function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.render=function(){return n.createElement(m.Provider,{value:new t(this.props.value).getResult()},this.props.children)},r}(r.Component)).propTypes={value:h.any,children:h.node},module.exports=O;
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("react"),n=e(r),t=e(require("ua-parser-js"));var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;var u=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var n,t,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var f in n=Object(arguments[c]))a.call(n,f)&&(u[f]=n[f]);if(o){t=o(n);for(var p=0;p<t.length;p++)i.call(n,t[p])&&(u[t[p]]=n[t[p]])}}return u},c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",f=function(){};if("production"!==process.env.NODE_ENV){var p=c,s={};f=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}var l=function(e,r,n,t,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(e.hasOwnProperty(a)){var i;try{if("function"!=typeof e[a]){var u=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](r,a,t,n,null,p)}catch(e){i=e}if(!i||i instanceof Error||f((t||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in s)){s[i.message]=!0;var c=o?o():"";f("Failed "+n+" type: "+i.message+(null!=c?c:""))}}},y=function(){};function d(){return null}"production"!==process.env.NODE_ENV&&(y=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}});var v=function(e,r){var n="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var o="<<anonymous>>",a={array:s("array"),bool:s("boolean"),func:s("function"),number:s("number"),object:s("object"),string:s("string"),symbol:s("symbol"),any:p(d),arrayOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=r[n];if(!Array.isArray(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an array.")}for(var p=0;p<i.length;p++){var s=e(i,p,t,o,a+"["+p+"]",c);if(s instanceof Error)return s}return null})},element:function(){return p(function(r,n,t,o,a){var i=r[n];if(!e(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return p(function(r,n,t,a,i){if(!(r[n]instanceof e)){var u=e.name||o,c=function(e){if(!e.constructor||!e.constructor.name)return o;return e.constructor.name}(r[n]);return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+t+"`, expected instance of `"+u+"`.")}return null})},node:function(){return p(function(e,r,n,t,o){if(!v(e[r]))return new f("Invalid "+t+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an object.");for(var p in i)if(i.hasOwnProperty(p)){var s=e(i,p,t,o,a+"."+p,c);if(s instanceof Error)return s}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOf, expected an instance of array."),d;return p(function(r,n,t,o,a){for(var u=r[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var p=JSON.stringify(e);return new f("Invalid "+o+" `"+a+"` of value `"+u+"` supplied to `"+t+"`, expected one of "+p+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var r=0;r<e.length;r++){var n=e[r];if("function"!=typeof n)return y("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+r+"."),d}return p(function(r,n,t,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(r,n,t,o,a,c))return null}return new f("Invalid "+o+" `"+a+"` supplied to `"+t+"`.")})},shape:function(e){return p(function(r,n,t,o,a){var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected `object`.");for(var p in e){var s=e[p];if(s){var l=s(i,p,t,o,a+"."+p,c);if(l)return l}}return null})},exact:function(e){return p(function(r,n,t,o,a){var i=r[n],p=b(i);if("object"!==p)return new f("Invalid "+o+" `"+a+"` of type `"+p+"` supplied to `"+t+"`, expected `object`.");var s=u({},r[n],e);for(var l in s){var y=e[l];if(!y)return new f("Invalid "+o+" `"+a+"` key `"+l+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=y(i,l,t,o,a+"."+l,c);if(d)return d}return null})}};function i(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function f(e){this.message=e,this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var n={},t=0;function a(a,i,u,p,s,l,d){if(p=p||o,l=l||u,d!==c){if(r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=p+":"+u;!n[b]&&t<3&&(y("You are manually calling a React.PropTypes validation function for the `"+l+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[b]=!0,t++)}}return null==i[u]?a?new f(null===i[u]?"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(i,u,p,s,l)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function s(e){return p(function(r,n,t,o,a,i){var u=r[n];return b(u)!==e?new f("Invalid "+o+" `"+a+"` of type `"+h(u)+"` supplied to `"+t+"`, expected `"+e+"`."):null})}function v(r){switch(typeof r){case"number":case"string":case"undefined":return!0;case"boolean":return!r;case"object":if(Array.isArray(r))return r.every(v);if(null===r||e(r))return!0;var o=function(e){var r=e&&(n&&e[n]||e[t]);if("function"==typeof r)return r}(r);if(!o)return!1;var a,i=o.call(r);if(o!==r.entries){for(;!(a=i.next()).done;)if(!v(a.value))return!1}else for(;!(a=i.next()).done;){var u=a.value;if(u&&!v(u[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||"Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol}(r,e)?"symbol":r}function h(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function m(e){var r=h(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return f.prototype=Error.prototype,a.checkPropTypes=l,a.PropTypes=a,a};function b(){}var h,m=(function(e){if("production"!==process.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=v(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},!0)}else e.exports=function(){function e(e,r,n,t,o,a){if(a!==c){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return n.checkPropTypes=b,n.PropTypes=n,n}()}(h={exports:{}},h.exports),h.exports),g=n.createContext(),O=g.Consumer,w=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.render=function(){return n.createElement(g.Provider,{value:new t(this.props.value).getResult()},this.props.children)},r}(r.Component);w.propTypes={value:m.any,children:m.node},exports.UserAgent=O,exports.UserAgentProvider=w;
//# sourceMappingURL=react-ua.js.map

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("ua-parser-js")):"function"==typeof define&&define.amd?define(["react","ua-parser-js"],r):e.reactUa=r(e.react,e.UAParser)}(this,function(e,r){var n="default"in e?e.default:e;r=r&&r.hasOwnProperty("default")?r.default:r;var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var i=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var n,i,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var f in n=Object(arguments[c]))o.call(n,f)&&(u[f]=n[f]);if(t){i=t(n);for(var p=0;p<i.length;p++)a.call(n,i[p])&&(u[i[p]]=n[i[p]])}}return u},u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",c=function(){};if("production"!==process.env.NODE_ENV){var f=u,p={};c=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}var s=function(e,r,n,t,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(e.hasOwnProperty(a)){var i;try{if("function"!=typeof e[a]){var u=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](r,a,t,n,null,f)}catch(e){i=e}if(!i||i instanceof Error||c((t||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in p)){p[i.message]=!0;var s=o?o():"";c("Failed "+n+" type: "+i.message+(null!=s?s:""))}}},l=function(){};function y(){return null}"production"!==process.env.NODE_ENV&&(l=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}});var d=function(e,r){var n="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var o="<<anonymous>>",a={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:p(y),arrayOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=r[n];if(!Array.isArray(i)){var c=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+t+"`, expected an array.")}for(var p=0;p<i.length;p++){var s=e(i,p,t,o,a+"["+p+"]",u);if(s instanceof Error)return s}return null})},element:function(){return p(function(r,n,t,o,a){var i=r[n];if(!e(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return p(function(r,n,t,a,i){if(!(r[n]instanceof e)){var u=e.name||o,c=function(e){if(!e.constructor||!e.constructor.name)return o;return e.constructor.name}(r[n]);return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+t+"`, expected instance of `"+u+"`.")}return null})},node:function(){return p(function(e,r,n,t,o){if(!v(e[r]))return new f("Invalid "+t+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=r[n],c=b(i);if("object"!==c)return new f("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+t+"`, expected an object.");for(var p in i)if(i.hasOwnProperty(p)){var s=e(i,p,t,o,a+"."+p,u);if(s instanceof Error)return s}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&l("Invalid argument supplied to oneOf, expected an instance of array."),y;return p(function(r,n,t,o,a){for(var i=r[n],u=0;u<e.length;u++)if(c(i,e[u]))return null;var p=JSON.stringify(e);return new f("Invalid "+o+" `"+a+"` of value `"+i+"` supplied to `"+t+"`, expected one of "+p+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&l("Invalid argument supplied to oneOfType, expected an instance of array."),y;for(var r=0;r<e.length;r++){var n=e[r];if("function"!=typeof n)return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+r+"."),y}return p(function(r,n,t,o,a){for(var i=0;i<e.length;i++){var c=e[i];if(null==c(r,n,t,o,a,u))return null}return new f("Invalid "+o+" `"+a+"` supplied to `"+t+"`.")})},shape:function(e){return p(function(r,n,t,o,a){var i=r[n],c=b(i);if("object"!==c)return new f("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+t+"`, expected `object`.");for(var p in e){var s=e[p];if(s){var l=s(i,p,t,o,a+"."+p,u);if(l)return l}}return null})},exact:function(e){return p(function(r,n,t,o,a){var c=r[n],p=b(c);if("object"!==p)return new f("Invalid "+o+" `"+a+"` of type `"+p+"` supplied to `"+t+"`, expected `object`.");var s=i({},r[n],e);for(var l in s){var y=e[l];if(!y)return new f("Invalid "+o+" `"+a+"` key `"+l+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=y(c,l,t,o,a+"."+l,u);if(d)return d}return null})}};function c(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function f(e){this.message=e,this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var n={},t=0;function a(a,i,c,p,s,y,d){if(p=p||o,y=y||c,d!==u){if(r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=p+":"+c;!n[b]&&t<3&&(l("You are manually calling a React.PropTypes validation function for the `"+y+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[b]=!0,t++)}}return null==i[c]?a?new f(null===i[c]?"The "+s+" `"+y+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+s+" `"+y+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(i,c,p,s,y)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function d(e){return p(function(r,n,t,o,a,i){var u=r[n];return b(u)!==e?new f("Invalid "+o+" `"+a+"` of type `"+h(u)+"` supplied to `"+t+"`, expected `"+e+"`."):null})}function v(r){switch(typeof r){case"number":case"string":case"undefined":return!0;case"boolean":return!r;case"object":if(Array.isArray(r))return r.every(v);if(null===r||e(r))return!0;var o=function(e){var r=e&&(n&&e[n]||e[t]);if("function"==typeof r)return r}(r);if(!o)return!1;var a,i=o.call(r);if(o!==r.entries){for(;!(a=i.next()).done;)if(!v(a.value))return!1}else for(;!(a=i.next()).done;){var u=a.value;if(u&&!v(u[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||"Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol}(r,e)?"symbol":r}function h(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function m(e){var r=h(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return f.prototype=Error.prototype,a.checkPropTypes=s,a.PropTypes=a,a};function v(){}var b,h=(function(e){if("production"!==process.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=d(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},!0)}else e.exports=function(){function e(e,r,n,t,o,a){if(a!==u){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return n.checkPropTypes=v,n.PropTypes=n,n}()}(b={exports:{}},b.exports),b.exports),m=n.createContext(),O=m.Consumer;return(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.render=function(){return n.createElement(m.Provider,{value:new r(this.props.value).getResult()},this.props.children)},t}(e.Component)).propTypes={value:h.any,children:h.node},O});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("ua-parser-js")):"function"==typeof define&&define.amd?define(["exports","react","ua-parser-js"],r):r(e.reactUa={},e.react,e.UAParser)}(this,function(e,r,n){var t="default"in r?r.default:r;n=n&&n.hasOwnProperty("default")?n.default:n;var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;var u=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var n,t,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var f in n=Object(arguments[c]))a.call(n,f)&&(u[f]=n[f]);if(o){t=o(n);for(var p=0;p<t.length;p++)i.call(n,t[p])&&(u[t[p]]=n[t[p]])}}return u},c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",f=function(){};if("production"!==process.env.NODE_ENV){var p=c,s={};f=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}var l=function(e,r,n,t,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(e.hasOwnProperty(a)){var i;try{if("function"!=typeof e[a]){var u=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](r,a,t,n,null,p)}catch(e){i=e}if(!i||i instanceof Error||f((t||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in s)){s[i.message]=!0;var c=o?o():"";f("Failed "+n+" type: "+i.message+(null!=c?c:""))}}},y=function(){};function d(){return null}"production"!==process.env.NODE_ENV&&(y=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}});var v=function(e,r){var n="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var o="<<anonymous>>",a={array:s("array"),bool:s("boolean"),func:s("function"),number:s("number"),object:s("object"),string:s("string"),symbol:s("symbol"),any:p(d),arrayOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=r[n];if(!Array.isArray(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an array.")}for(var p=0;p<i.length;p++){var s=e(i,p,t,o,a+"["+p+"]",c);if(s instanceof Error)return s}return null})},element:function(){return p(function(r,n,t,o,a){var i=r[n];if(!e(i)){var u=b(i);return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return p(function(r,n,t,a,i){if(!(r[n]instanceof e)){var u=e.name||o,c=function(e){if(!e.constructor||!e.constructor.name)return o;return e.constructor.name}(r[n]);return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+t+"`, expected instance of `"+u+"`.")}return null})},node:function(){return p(function(e,r,n,t,o){if(!v(e[r]))return new f("Invalid "+t+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return p(function(r,n,t,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected an object.");for(var p in i)if(i.hasOwnProperty(p)){var s=e(i,p,t,o,a+"."+p,c);if(s instanceof Error)return s}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOf, expected an instance of array."),d;return p(function(r,n,t,o,a){for(var u=r[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var p=JSON.stringify(e);return new f("Invalid "+o+" `"+a+"` of value `"+u+"` supplied to `"+t+"`, expected one of "+p+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&y("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var r=0;r<e.length;r++){var n=e[r];if("function"!=typeof n)return y("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+r+"."),d}return p(function(r,n,t,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(r,n,t,o,a,c))return null}return new f("Invalid "+o+" `"+a+"` supplied to `"+t+"`.")})},shape:function(e){return p(function(r,n,t,o,a){var i=r[n],u=b(i);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+t+"`, expected `object`.");for(var p in e){var s=e[p];if(s){var l=s(i,p,t,o,a+"."+p,c);if(l)return l}}return null})},exact:function(e){return p(function(r,n,t,o,a){var i=r[n],p=b(i);if("object"!==p)return new f("Invalid "+o+" `"+a+"` of type `"+p+"` supplied to `"+t+"`, expected `object`.");var s=u({},r[n],e);for(var l in s){var y=e[l];if(!y)return new f("Invalid "+o+" `"+a+"` key `"+l+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=y(i,l,t,o,a+"."+l,c);if(d)return d}return null})}};function i(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function f(e){this.message=e,this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var n={},t=0;function a(a,i,u,p,s,l,d){if(p=p||o,l=l||u,d!==c){if(r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=p+":"+u;!n[b]&&t<3&&(y("You are manually calling a React.PropTypes validation function for the `"+l+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[b]=!0,t++)}}return null==i[u]?a?new f(null===i[u]?"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+s+" `"+l+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(i,u,p,s,l)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function s(e){return p(function(r,n,t,o,a,i){var u=r[n];return b(u)!==e?new f("Invalid "+o+" `"+a+"` of type `"+h(u)+"` supplied to `"+t+"`, expected `"+e+"`."):null})}function v(r){switch(typeof r){case"number":case"string":case"undefined":return!0;case"boolean":return!r;case"object":if(Array.isArray(r))return r.every(v);if(null===r||e(r))return!0;var o=function(e){var r=e&&(n&&e[n]||e[t]);if("function"==typeof r)return r}(r);if(!o)return!1;var a,i=o.call(r);if(o!==r.entries){for(;!(a=i.next()).done;)if(!v(a.value))return!1}else for(;!(a=i.next()).done;){var u=a.value;if(u&&!v(u[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||"Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol}(r,e)?"symbol":r}function h(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function m(e){var r=h(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return f.prototype=Error.prototype,a.checkPropTypes=l,a.PropTypes=a,a};function b(){}var h,m=(function(e){if("production"!==process.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=v(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},!0)}else e.exports=function(){function e(e,r,n,t,o,a){if(a!==c){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return n.checkPropTypes=b,n.PropTypes=n,n}()}(h={exports:{}},h.exports),h.exports),g=t.createContext(),O=g.Consumer,w=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.render=function(){return t.createElement(g.Provider,{value:new n(this.props.value).getResult()},this.props.children)},r}(r.Component);w.propTypes={value:m.any,children:m.node},e.UserAgent=O,e.UserAgentProvider=w});
//# sourceMappingURL=react-ua.umd.js.map
{
"name": "react-ua",
"version": "0.1.2",
"version": "0.1.3",
"description": "React User Agent component and provider with new React Context API",
"main": "dist/react-ua.js",
"umd:main": "dist/react-ua.umd.js",
"module": "dist/react-ua.mjs",
"source": "src/react-ua.js",

@@ -9,0 +8,0 @@ "files": [

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

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