Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whisklabs/typeguards
Whisk typeguards for TypeScript
https://github.com/whisklabs/typeguards
Last synced: 9 days ago
JSON representation
Whisk typeguards for TypeScript
- Host: GitHub
- URL: https://github.com/whisklabs/typeguards
- Owner: whisklabs
- License: mit
- Created: 2020-09-10T15:44:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T15:10:49.000Z (over 1 year ago)
- Last Synced: 2024-12-31T06:39:31.169Z (13 days ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TypeGuards
## Install
```bash
npm i @whisklabs/typesguards
```## Usage
```ts
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