@xylabs/platform
Advanced tools
Comparing version 2.13.20 to 2.13.21
// src/browser/index.ts | ||
var isBrowser = () => { | ||
return typeof window !== "undefined" && typeof window?.document !== "undefined"; | ||
return window?.document !== void 0; | ||
}; | ||
@@ -5,0 +5,0 @@ var isWebworker = () => { |
@@ -1,2 +0,2 @@ | ||
export { subtle } from 'crypto'; | ||
export { subtle } from 'node:crypto'; | ||
export declare const isBrowser: () => boolean; | ||
@@ -3,0 +3,0 @@ export declare const isWebworker: () => boolean; |
// src/node/index.ts | ||
import { subtle } from "crypto"; | ||
import { subtle } from "node:crypto"; | ||
var isBrowser = () => { | ||
return typeof window !== "undefined" && typeof (window == null ? void 0 : window.document) !== "undefined"; | ||
return (window == null ? void 0 : window.document) !== void 0; | ||
}; | ||
@@ -6,0 +6,0 @@ var isWebworker = () => { |
@@ -42,2 +42,3 @@ { | ||
"keywords": [ | ||
"platform", | ||
"xylabs", | ||
@@ -49,7 +50,10 @@ "utility", | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.2.10", | ||
"@xylabs/tsconfig": "^3.2.10", | ||
"@xylabs/tsconfig-dom": "^3.2.10", | ||
"typescript": "^5.3.2" | ||
"@xylabs/ts-scripts-yarn3": "^3.2.25", | ||
"@xylabs/tsconfig": "^3.2.25", | ||
"@xylabs/tsconfig-dom": "^3.2.25", | ||
"typescript": "^5.3.3" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"publishConfig": { | ||
@@ -63,4 +67,4 @@ "access": "public" | ||
"sideEffects": false, | ||
"version": "2.13.20", | ||
"version": "2.13.21", | ||
"type": "module" | ||
} |
@@ -1,5 +0,5 @@ | ||
import type { subtle as subtleType } from 'crypto' | ||
import type { subtle as subtleType } from 'node:crypto' | ||
export const isBrowser = () => { | ||
return typeof window !== 'undefined' && typeof window?.document !== 'undefined' | ||
return window?.document !== undefined | ||
} | ||
@@ -6,0 +6,0 @@ |
@@ -1,5 +0,5 @@ | ||
export { subtle } from 'crypto' | ||
export { subtle } from 'node:crypto' | ||
export const isBrowser = () => { | ||
return typeof window !== 'undefined' && typeof window?.document !== 'undefined' | ||
return window?.document !== undefined | ||
} | ||
@@ -6,0 +6,0 @@ |
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
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
23040