is-browser
shadcn-hooks/is-browserFreeUtility
A library that checks if the code is running in a browser.
Install it
npx shadcn@latest add https://shadcn-hooks.com/r/is-browser.jsonSource
1/**2 * A library that checks if the code is running in a browser.3 */4export const isBrowser = typeof window !== 'undefined'
Files it writes
More from shadcn-hooks
All 58 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| create-contextcreate-context | shadcn-hooks | Utilities | Free | no deps | |
| create-effect-with-targetcreate-effect-with-target | shadcn-hooks | Utilities | Free | 1 dep |
