mirror of
https://github.com/cupcakearmy/occulto.git
synced 2025-12-16 08:54:59 +00:00
aes
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const isBrowser = typeof window !== 'undefined'
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export type PromiseOrValue<T> = T | Promise<T>
|
||||
|
||||
export type TypedArray =
|
||||
| Int8Array
|
||||
| Uint8Array
|
||||
@@ -12,6 +19,9 @@ export type TypedArray =
|
||||
| BigInt64Array
|
||||
| BigUint64Array
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function split<T>({ node, browser }: { node: () => T; browser: () => T }) {
|
||||
return isBrowser ? browser() : node()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user