Skip to content

Commit

Permalink
basic deno support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Feb 25, 2023
1 parent 1112341 commit 4b28fa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion environment.js
Expand Up @@ -15,7 +15,7 @@ import * as f from './function.js'
export const isNode = typeof process !== 'undefined' && process.release &&
/node|io\.js/.test(process.release.name)
/* c8 ignore next */
export const isBrowser = typeof window !== 'undefined' && !isNode
export const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode
/* c8 ignore next 3 */
export const isMac = typeof navigator !== 'undefined'
? /Mac/.test(navigator.platform)
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -382,6 +382,9 @@
},
"./webcrypto": {
"types": "./webcrypto.browser.d.ts",
"deno": {
"import": "./webcrypto.deno.js"
},
"node": {
"import": "./webcrypto.node.js",
"require": "./dist/webcrypto.node.cjs"
Expand Down

0 comments on commit 4b28fa7

Please sign in to comment.