1.0.5 • Published 3 years ago

@react-typed-hooks/utils v1.0.5

Weekly downloads
488
License
MIT
Repository
github
Last release
3 years ago

Utils

Utility functions to use within hooks.

version

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);
}