Utils Utility functions to use within hooks. Installation npm install @react-typed-hooks/utils Usage hasWindow Returns true if window is a type of object. import { hasWindow } from @react-typed-hooks/utils; if (hasWindow()) { window.addEventListener("keydown", downHandler); }