buster/web/src/lib/isBrowser.ts

8 lines
147 B
TypeScript

export const isBrowser = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
export default isBrowser;