Skip to content

Latest commit

 

History

History
646 lines (387 loc) · 9.88 KB

README.md

File metadata and controls

646 lines (387 loc) · 9.88 KB

@sniptt/guards

@sniptt/guards

Table of contents

Namespaces

Functions

Functions

isArray

Const isArray<T, U>(term): term is T[]

Type parameters

Name
T
U

Parameters

Name Type
term U | T[]

Returns

term is T[]

Defined in

guards/structural.ts:17


isBigInt

Const isBigInt<U>(term): term is bigint

Type parameters

Name
U

Parameters

Name Type
term bigint | U

Returns

term is bigint

Defined in

guards/primitives.ts:19


isBoolean

Const isBoolean<U>(term): term is boolean

Type parameters

Name
U

Parameters

Name Type
term boolean | U

Returns

term is boolean

Defined in

guards/primitives.ts:7


isDate

Const isDate<U>(term): term is Date

Type parameters

Name
U

Parameters

Name Type
term U | Date

Returns

term is Date

Defined in

guards/structural.ts:41


isFunction

Const isFunction<T, U>(term): term is T

Type parameters

Name Type
T extends Function
U U

Parameters

Name Type
term T | U

Returns

term is T

Defined in

guards/structural.ts:7


isInteger

Const isInteger<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/convenience.ts:20


isMap

Const isMap<K, V, U>(term): term is Map<K, V>

Type parameters

Name
K
V
U

Parameters

Name Type
term U | Map<K, V>

Returns

term is Map<K, V>

Defined in

guards/structural.ts:21


isNegativeInteger

Const isNegativeInteger<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/convenience.ts:32


isNonEmptyArray

Const isNonEmptyArray<T, U>(term): term is T[]

Type parameters

Name
T
U

Parameters

Name Type
term U | T[]

Returns

term is T[]

Defined in

guards/convenience.ts:8


isNonEmptyString

Const isNonEmptyString<U>(term): term is string

Type parameters

Name
U

Parameters

Name Type
term string | U

Returns

term is string

Defined in

guards/convenience.ts:12


isNonNegativeInteger

Const isNonNegativeInteger<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/convenience.ts:28


isNull

Const isNull<T>(term): term is null

Type parameters

Name
T

Parameters

Name Type
term null | T

Returns

term is null

Defined in

guards/structural.ts:3


isNumber

Const isNumber<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/primitives.ts:11


isNumberOrNaN

Const isNumberOrNaN<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/convenience.ts:16


isObject

Const isObject<T, U>(term): term is NonNullable<T>

Type parameters

Name Type
T extends object
U U

Parameters

Name Type
term T | U

Returns

term is NonNullable<T>

Defined in

guards/structural.ts:11


isObjectOrNull

Const isObjectOrNull<T, U>(term): term is T

Type parameters

Name Type
T extends object
U U

Parameters

Name Type
term T | U

Returns

term is T

Defined in

guards/convenience.ts:4


isPositiveInteger

Const isPositiveInteger<U>(term): term is number

Type parameters

Name
U

Parameters

Name Type
term number | U

Returns

term is number

Defined in

guards/convenience.ts:24


isSet

Const isSet<T, U>(term): term is Set<T>

Type parameters

Name
T
U

Parameters

Name Type
term U | Set<T>

Returns

term is Set<T>

Defined in

guards/structural.ts:25


isString

Const isString<U>(term): term is string

Type parameters

Name
U

Parameters

Name Type
term string | U

Returns

term is string

Defined in

guards/primitives.ts:15


isSymbol

Const isSymbol<U>(term): term is symbol

Type parameters

Name
U

Parameters

Name Type
term symbol | U

Returns

term is symbol

Defined in

guards/primitives.ts:23


isUndefined

Const isUndefined<T>(term): term is undefined

Type parameters

Name
T

Parameters

Name Type
term undefined | T

Returns

term is undefined

Defined in

guards/primitives.ts:3


isWeakMap

Const isWeakMap<K, V, U>(term): term is WeakMap<K, V>

Type parameters

Name Type
K extends object
V V
U U

Parameters

Name Type
term U | WeakMap<K, V>

Returns

term is WeakMap<K, V>

Defined in

guards/structural.ts:29


isWeakSet

Const isWeakSet<T, U>(term): term is WeakSet<T>

Type parameters

Name Type
T extends object
U U

Parameters

Name Type
term U | WeakSet<T>

Returns

term is WeakSet<T>

Defined in

guards/structural.ts:35