@react-typed-hooks/utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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

/@react-typed-hooks/utils/

    Package Sidebar

    Install

    npm i @react-typed-hooks/utils

    Weekly Downloads

    482

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    5.57 kB

    Total Files

    19

    Last publish

    Collaborators

    • cjdierkens