Skip to content

whisklabs/typeguards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9d4865b · Sep 27, 2023

History

5 Commits
Sep 27, 2023
Sep 27, 2023
Sep 27, 2023
Sep 14, 2020
Sep 14, 2020
Sep 27, 2023
Sep 14, 2020
Sep 27, 2023
Sep 27, 2023
Sep 14, 2020
Sep 14, 2020

Repository files navigation

TypeGuards

Install

npm i @whisklabs/typesguards

Usage

import { ... } from '@whisklabs/typesguards';

Functions

  • isPresent - not undefined or null
  • isUndefined - undefined value
  • isDefined - not undefined value
  • isObject - object with Generic support
  • isString - string value
  • isNumber - number value
  • isNaN - NaN value
  • isDate - Date object
  • isArray - Array with Generic support
  • isError - any Error types
  • isErrorEvent - Error Event
  • isFunction - any function
  • isRegExp - RegExp value
  • isText - non empty string
  • isBoolean - boolean value
  • isWindow - window object
  • isFile - File object
  • isFormData - Form Data object
  • isBlob - blob value
  • isPromiseLike - Promise-like object
  • isArrayBuffer - any type of ArrayBuffer
  • isTypedArray - any type of TypedArray