mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 19:04:46 +00:00
feat(packages/platform): add global isClient util and build config
This commit is contained in:
@@ -17,3 +17,12 @@ export const _global =
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: undefined;
|
||||
|
||||
/**
|
||||
* @name isClient
|
||||
* @category Multi
|
||||
* @description Check if the current environment is the client
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
export const isClient = typeof window !== 'undefined' && typeof document !== 'undefined';
|
||||
Reference in New Issue
Block a user