New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webdetta

Package Overview
Dependencies
Maintainers
0
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdetta - npm Package Compare versions

Comparing version 0.0.82 to 0.0.83

2

package.json
{
"name": "webdetta",
"version": "0.0.82",
"version": "0.0.83",
"author": "Fedot Kriutchenko <fodyadev@gmail.com>",

@@ -5,0 +5,0 @@ "description": "",

@@ -0,19 +1,35 @@

let globals;
try { globals = globalThis; }
catch (e) { globals = {}; }
const get = (...path) => {
const obj = globals;
for (const k of path) {
if (typeof obj != 'object' || obj == null) return null;
obj = obj[k];
}
return obj;
}
export default (
typeof window?.document != null
get('window', 'document') != null
? 'browser' :
process?.versions?.node != null
get('process', 'versions', 'node') != null
? 'node' :
get('self', 'constructor', 'name') === 'DedicatedWorkerGlobalScope'
? 'webworker' :
// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327
window?.name === 'nodejs' ||
(navigator?.userAgent ?? '').includes('Node.js') ||
(navigator?.userAgent ?? '').includes('jsdom')
? 'jsdom' :
get('window', 'name') === 'nodejs' ||
['Node.js', 'jsdom'].some(d =>
String(get('navigator', 'userAgent') ?? '').includes(d)
) ? 'jsdom' :
Deno?.version?.deno != null
get('Deno', 'version', 'deno') != null
? 'deno' :
// https://bun.sh/guides/util/detect-bun
process?.versions?.bun != null
get('process', 'versions', 'bun') != null
? 'bun' :

@@ -20,0 +36,0 @@

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