Socket
Socket
Sign inDemoInstall

detect-browser-node-ssr

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

10

dist/index.esm.js

@@ -1,8 +0,6 @@

const bDomNode = !!(typeof global == "object" && global.process && global.process.release && global.process.release.name && typeof HTMLCanvasElement == "undefined");
const bWorkerNode = !!(typeof global == "object" && global.process && global.process.release && global.process.release.name);
const bSSR = !bDomNode && typeof self == "undefined";
const domGlobalThis = (bDomNode ? global : (bSSR ? {} : self));
const workerGlobalThis = (bWorkerNode ? global : self);
const bNode = !!(typeof global == "object" && global.process && global.process.release && global.process.release.name && typeof HTMLCanvasElement == "undefined");
const bSSR = !bNode && typeof self == "undefined";
const globalThis = (bNode ? global : (bSSR ? {} : self));
export { bDomNode, bSSR, bWorkerNode, domGlobalThis, workerGlobalThis };
export { bNode, bSSR, globalThis };
//# sourceMappingURL=index.mjs.map

8

dist/types/index.d.ts

@@ -1,7 +0,5 @@

declare const bDomNode: boolean;
declare const bWorkerNode: boolean;
declare const bNode: boolean;
declare const bSSR: boolean;
declare const domGlobalThis: any;
declare const workerGlobalThis: any;
export { bDomNode, bWorkerNode, bSSR, domGlobalThis, workerGlobalThis };
declare const globalThis: any;
export { bNode, bSSR, globalThis };
//# sourceMappingURL=index.d.ts.map
{
"name": "detect-browser-node-ssr",
"version": "1.0.1",
"version": "2.0.0",
"description": "",

@@ -5,0 +5,0 @@ "files": [

@@ -1,7 +0,5 @@

const bDomNode = !!(typeof global=="object"&&global.process&&global.process.release&&global.process.release.name&&typeof HTMLCanvasElement=="undefined");
const bWorkerNode = !!(typeof global=="object"&&global.process&&global.process.release&&global.process.release.name);
const bSSR = !bDomNode && typeof self=="undefined";
const domGlobalThis = (bDomNode?global:(bSSR?{}:self)) as any;
const workerGlobalThis = (bWorkerNode?global:self) as any;
const bNode = !!(typeof global=="object"&&global.process&&global.process.release&&global.process.release.name&&typeof HTMLCanvasElement=="undefined");
const bSSR = !bNode && typeof self=="undefined";
const globalThis = (bNode?global:(bSSR?{}:self)) as any;
export { bDomNode, bWorkerNode, bSSR, domGlobalThis, workerGlobalThis }
export { bNode, bSSR, globalThis }

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc