UNPKG
@better-auth/utils
Version:
beta (0.2.2-beta.2)
latest (0.3.0)
0.3.0
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.2-beta.2
0.2.2-beta.1
0.2.1
0.2.0
0.1.19
0.1.18
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.5
0.1.4
A collection of utilities for better-auth
github.com/better-auth/utils
better-auth/utils
@better-auth/utils
/
dist
/
index.cjs
11 lines
(8 loc)
•
306 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
function
getWebcryptoSubtle
(
) {
const
cr =
typeof
globalThis !==
"undefined"
&& globalThis.
crypto
;
if
(cr &&
typeof
cr.
subtle
===
"object"
&& cr.
subtle
!=
null
)
return
cr.
subtle
;
throw
new
Error
(
"crypto.subtle must be defined"
); }
exports
.
getWebcryptoSubtle
= getWebcryptoSubtle;