Skip to content

Commit 4b28fa7

Browse files
committed
basic deno support
1 parent 1112341 commit 4b28fa7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import * as f from './function.js'
1515
export const isNode = typeof process !== 'undefined' && process.release &&
1616
/node|io\.js/.test(process.release.name)
1717
/* c8 ignore next */
18-
export const isBrowser = typeof window !== 'undefined' && !isNode
18+
export const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode
1919
/* c8 ignore next 3 */
2020
export const isMac = typeof navigator !== 'undefined'
2121
? /Mac/.test(navigator.platform)

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@
382382
},
383383
"./webcrypto": {
384384
"types": "./webcrypto.browser.d.ts",
385+
"deno": {
386+
"import": "./webcrypto.deno.js"
387+
},
385388
"node": {
386389
"import": "./webcrypto.node.js",
387390
"require": "./dist/webcrypto.node.cjs"

0 commit comments

Comments
 (0)