platform-detect
Advanced tools
Comparing version 0.0.6 to 0.1.0
@@ -1,1 +0,1 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e["platform-detect"]=o()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&"undefined"!=typeof window;if(e&&"undefined"!=typeof nw)try{nw.Window.get()}catch(o){e=!1}var o=!e,n=e?navigator.userAgent:void 0,i="undefined"!=typeof process&&!!process.versions&&!!process.versions.node,d=e&&window.matchMedia("(display-mode: standalone)").matches&&null!==document.head.querySelector('[rel="manifest"]'),s="undefined"!=typeof Windows&&"undefined"!=typeof MSApp,r=!(!i||!process.versions.nw),t=!(!i||!process.versions.electron),c=e&&!!window.cordova,f=!(i||s||r||t||c),a=!(i||s||r||t||c||d),l=(!e&&"undefined"!=typeof self&&!!self.importScripts&&self.close,i?"win32"===process.platform:n.includes("Windows")),p=(i&&process.platform,i?process.platform:n.includes("Macintosh"),e&&n.includes("CrOS")),u=e&&n.includes("Android"),w=e&&n.includes("Edge/"),m=e&&n.includes("Chrome")&&!n.includes("Edge/"),v=e&&n.includes("Safari"),h="undefined"!=typeof navigator&&navigator.maxTouchPoints>0,g=s||void 0,y=!1;if(r)y="sdk"===process.versions["nw-flavor"];else if(t)y=process.execPath.replace(/\\/g,"/").includes("node_modules/electron/");else if(s)y=Windows.ApplicationModel.Package.current.isDevelopmentMode;else if(a&&(e&&(y=window.outerWidth-window.innerWidth>50||window.outerHeight-window.innerHeight>140),!y)){let e=/./;e.toString=(()=>y=!0),console.log("%c",e)}return{windows:l,android:u,chromeos:p,edge:w,chrome:m,safari:v,node:i,web:f,browser:a,pwa:d,uwp:s,cordova:c,chromeapp:void 0,nwjs:r,electron:t,nw:r,touch:h,hasWindow:e,isConsole:o,window:e,console:o,csp:g,sdk:y,dev:y}}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define("platform-detect",o):e["platform-detect"]=o()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&"undefined"!=typeof window;if(e&&"undefined"!=typeof nw)try{nw.Window.get()}catch(o){e=!1}var o=!e,n=e?navigator.userAgent:void 0,i="undefined"!=typeof process&&!!process.versions&&!!process.versions.node,d=e&&window.matchMedia("(display-mode: standalone)").matches&&null!==document.head.querySelector('[rel="manifest"]'),s="undefined"!=typeof Windows&&"undefined"!=typeof MSApp,t=!(!i||!process.versions.nw),r=!(!i||!process.versions.electron),c=e&&!!window.cordova,f=!(i||s||t||r||c),a=!(i||s||t||r||c||d),l=(!e&&"undefined"!=typeof self&&!!self.importScripts&&self.close,i?"win32"===process.platform:n.includes("Windows")),p=(i&&process.platform,i?process.platform:n.includes("Macintosh"),e&&n.includes("CrOS")),u=e&&n.includes("Android"),w=e&&n.includes("Edge/"),m=e&&n.includes("Chrome")&&!n.includes("Edge/"),v=e&&n.includes("Safari"),h="undefined"!=typeof navigator&&navigator.maxTouchPoints>0,g=s||void 0,y=!1;if(t)y="sdk"===process.versions["nw-flavor"];else if(r)y=process.execPath.replace(/\\/g,"/").includes("node_modules/electron/");else if(s)y=Windows.ApplicationModel.Package.current.isDevelopmentMode;else if(a&&(e&&(y=window.outerWidth-window.innerWidth>50||window.outerHeight-window.innerHeight>140),!y)){let e=/./;e.toString=(()=>y=!0),console.log("%c",e)}return{windows:l,android:u,chromeos:p,edge:w,chrome:m,safari:v,node:i,web:f,browser:a,pwa:d,uwp:s,cordova:c,chromeapp:void 0,nwjs:t,electron:r,nw:t,touch:h,hasWindow:e,isConsole:o,window:e,console:o,csp:g,sdk:y,dev:y}}); |
{ | ||
"name": "platform-detect", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"description": "🃏 Minimalistic isomorphic library for detection of platform, runtime, APIs and more.", | ||
@@ -5,0 +5,0 @@ "author": "Mike Kovarik", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11899