UNPKG

@alwatr/platform-info

Version:

This module provides a way to detect the current platform where the script is running. It defines a constant `platformInfo` which holds the information about the current platform.

6 lines (4 loc) 898 B
/* 📦 @alwatr/platform-info v9.25.0 */ var g=(()=>{let b={development:!1,isNode:!1,isBrowser:!1,isWebWorker:!1,isDeno:!1,isBun:!1,isCli:!1,isNw:!1,isElectron:!1};if(typeof window==="object"&&typeof document==="object"&&document.nodeType===Node.DOCUMENT_NODE)b.isBrowser=!0,b.isWebWorker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope;else if(typeof process==="object"){if(b.isCli=!0,process.versions?.node!=null)b.isNode=!0;if(typeof Bun<"u")b.isBun=!0;else if(process.versions?.electron!=null)b.isElectron=!0;else if(typeof nw<"u")b.isNw=!0}if(typeof Deno<"u")b.isCli=!0,b.isDeno=!0;if(b.isBrowser===!0)b.development=location.hostname==="localhost"||location.hostname.indexOf("127.")===0;else if(b.isCli===!0)b.development=process.env.NODE_ENV!=="production";return b})();export{g as platformInfo}; //# debugId=86200CE8FC8547C764756E2164756E21 //# sourceMappingURL=main.js.map