Skip to content

Function: isBrowser()

ts
function isBrowser(): boolean;

Returns true if the code is running in a browser environment.

Returns

boolean

Example

ts
isBrowser() // true in browser, false in Node

Since

1.0.0

Released under the MIT License.