@xylabs/platform
Advanced tools
Comparing version 3.6.7 to 3.6.8
@@ -61,5 +61,5 @@ { | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.15.4", | ||
"@xylabs/tsconfig": "^3.15.4", | ||
"@xylabs/tsconfig-dom": "^3.15.4", | ||
"@xylabs/ts-scripts-yarn3": "^3.15.5", | ||
"@xylabs/tsconfig": "^3.15.5", | ||
"@xylabs/tsconfig-dom": "^3.15.5", | ||
"typescript": "^5.5.4" | ||
@@ -78,4 +78,4 @@ }, | ||
"sideEffects": false, | ||
"version": "3.6.7", | ||
"version": "3.6.8", | ||
"type": "module" | ||
} |
@@ -12,6 +12,8 @@ import type { subtle as subtleType } from 'node:crypto' | ||
export const getGlobal = <T extends object>() => | ||
isWebworker() ? (self as unknown as T) | ||
: isBrowser() ? (window as unknown as T) | ||
: globalThis | ||
isWebworker() | ||
? (self as unknown as T) | ||
: isBrowser() | ||
? (window as unknown as T) | ||
: globalThis | ||
export const subtle = getGlobal<Window>().crypto.subtle as typeof subtleType |
@@ -12,4 +12,6 @@ export { subtle } from 'node:crypto' | ||
export const getGlobal = <T extends object>() => | ||
isBrowser() ? (window as unknown as T) | ||
: isWebworker() ? (self as unknown as T) | ||
: globalThis | ||
isBrowser() | ||
? (window as unknown as T) | ||
: isWebworker() | ||
? (self as unknown as T) | ||
: 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
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
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
Sorry, the diff of this file is not supported yet
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
23205
181