Crustack
@crustack/utils

isServer

Indicates whether or not the code is running on the server.

import {  } from '@crustack/utils'

if () {
  // the code is running on the server
} else {
  // the code is running on the client
}