Is Client

Checks if the code is running in the client-side (browser).

CategoryValidations
AuthorPol Gubau
Since1.0.0
Last Updated2025-03-15
TypeSync
CompatibilityBrowser

Example

  • Input

    isClient()

    Output:

    true or false

Return

Returns true if running on the client-side (browser), otherwise false.

Type: boolean

Notes

This function checks for the presence of `window` to determine if it's a browser environment.

Tags

  • client
  • browser
  • environment

Related