1.0.5 • Published 3 years ago
@react-typed-hooks/utils v1.0.5
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);
}