UNPKG

@sitecore-jss/sitecore-jss

Version:

This module is provided as a part of Sitecore JavaScript Rendering SDK. It contains the core JSS APIs (layout service) and utilities.

9 lines (8 loc) 230 B
/** * Determines whether the current execution context is server-side * @returns true if executing server-side */ function isServer() { return !(typeof window !== 'undefined' && window.document); } export default isServer;