buster/web/src/lib/isBrowser.ts

8 lines
147 B
TypeScript
Raw Normal View History

2025-03-15 02:43:30 +08:00
export const isBrowser = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
export default isBrowser;