MCPcopy Create free account
hub / github.com/microsoft/SandDance / isBrowser

Function isBrowser

docs/app/js/sanddance-app.js:57927–57930  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57925var _isElectronDefault = parcelHelpers.interopDefault(_isElectron);
57926var process = require("process");
57927function isBrowser() {
57928 const isNode = typeof process === "object" && String(process) === "[object process]" && false;
57929 return !isNode || (0, _isElectronDefault.default)();
57930}
57931exports.default = isBrowser;
57932function isBrowserMainThread() {
57933 return isBrowser() && typeof document !== "undefined";

Callers 1

isBrowserMainThreadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected