0.1.0 • Published 2 years ago

@flowio/is v0.1.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years ago

@flowio/is

A JavaScript type testing library

Installation

npm install @flowio/is

API Reference

type AnyFunction = (...args: any[]) => any

type EmptyArray = never[]

type EmptyPlainObject = { [key: string]: never }

type PlainObject = { [key: string]: unknown }

isArguments(value?: unknown): value is ArrayLike<unknown>

Returns whether the given value is an argument object.

isArray(value?: unknown): value is unknown[]

Returns whether the given value is an array.

isBoolean(value?: unknown): value is boolean

Returns whether the given value is a boolean.

isDate(value?: unknown): value is Date

Returns whether the given value is a date.

isEmpty(value?: unknown): boolean

Returns whether the given value is empty.

isEmptyArray(value?: unknown): value is EmptyArray

Returns whether the given value is an empty array

isEmptyPlainObject(value?: unknown): value is EmptyPlainObject

Returns whether the given value is an empty plain object

isEmptyString(value?: unknown): boolean

Returns whether the given value is an empty string

isError(value?: unknown): value is Error

Returns whether the given value is an error object.

isFunction(value?: unknown): value is AnyFunction

Returns whether the given value is a function.

isNil(value?: unknown): value is null | undefined

Returns whether the given value is null or undefined.

isNotNil<T>(value: T | null | undefined): value is T

Returns whether the given value is not null or undefined.

isNull(value?: unknown): value is null

Returns whether the given value is null.

isNumber(value?: unknown): value is number

Returns whether the given value is a number, excluding NaN values.

isObject(value?: unknown): value is object

Returns whether the given value is any kind of object, including special classes or objects with different prototypes.

isPlainObject(value?: unknown): value is PlainObject

Returns whether the given value is a plain object, excluding special classes or objects with different prototypes.

isRegExp(value?: unknown): value is RegExp

Returns whether the given value is a regular expression.

isString(value?: unknown): value is string

Returns whether the given value is a string.

isUndefined(value?: unknown): value is undefined

Returns whether the given value is undefined.

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago