Deprecate utility tag
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: isBrowser
|
||||
tags: utility,browser,intermediate
|
||||
tags: browser,intermediate
|
||||
---
|
||||
|
||||
Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors.
|
||||
@ -16,4 +16,4 @@ const isBrowser = () => ![typeof window, typeof document].includes('undefined');
|
||||
```js
|
||||
isBrowser(); // true (browser)
|
||||
isBrowser(); // false (Node)
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user