Variables
Const all
all
: { <A>
(predicate
: Predicate<A>, value
: ReadonlyArray<A>): boolean; <A>
(predicate
: Predicate<A>): Predicate<ReadonlyArray<A>> } = curry(__all)
Type declaration
-
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns Predicate<ReadonlyArray<A>>
Const allPass
all
Pass: { <A>(predicates: ReadonlyArray<Predicate<A>>, value: A): boolean; <A>(predicates: ReadonlyArray<Predicate<A>>): Predicate<A> } = curry(__allPass) as {<A>(predicates: ReadonlyArray<Predicate<A>>, value: A): boolean<A>(predicates: ReadonlyArray<Predicate<A>>): Predicate<A>}
Type declaration
-
-
Type parameters
Parameters
-
predicates: ReadonlyArray<Predicate<A>>
-
value: A
Returns boolean
-
Type parameters
Parameters
Const and
and
: { <A, B>
(predicate1
: Is<A>, predicate2
: Is<B>, value
: unknown): value is A & B; <A, B>
(predicate1
: Is<A>, predicate2
: Is<B>): (value
: unknown) => value is A & B; <A>
(predicate1
: Is<A>): { <B>
(predicate2
: Is<B>, value
: unknown): value is A & B; <B>
(predicate2
: Is<B>): (value
: unknown) => value is A & B }; <A>
(predicate1
: Predicate<A>, predicate2
: Predicate<A>, value
: A): boolean; <A>
(predicate1
: Predicate<A>, predicate2
: Predicate<A>): Predicate<A>; <A>
(predicate1
: Predicate<A>): { (predicate2
: Predicate<A>, value
: A): boolean; (predicate2
: Predicate<A>): Predicate<A> } } = curry(__and) as {<C, A extends C, B extends C>(predicate1: Is<A>, predicate2: Is<B>, value: C): value is A & B<C, A extends C, B extends C>(predicate1: Is<A>, predicate2: Is<B>): (value: C) => value is A & B<C, A extends C>(predicate1: Is<A>): {<B extends C>(predicate2: Is<B>, value: C): value is A & B<B extends C>(predicate2: Is<B>): (value: C) => value is A & B}<A>(predicate1: Predicate<A>, predicate2: Predicate<A>, value: A): boolean<A>(predicate1: Predicate<A>, predicate2: Predicate<A>): Predicate<A><A>(predicate1: Predicate<A>): {(predicate2: Predicate<A>, value: A): boolean(predicate2: Predicate<A>): Predicate<A>}}
Type declaration
-
- <A, B>(predicate1: Is<A>, predicate2: Is<B>, value: unknown): value is A & B
- <A, B>(predicate1: Is<A>, predicate2: Is<B>): (value: unknown) => value is A & B
- <A>(predicate1: Is<A>): { <B>(predicate2: Is<B>, value: unknown): value is A & B; <B>(predicate2: Is<B>): (value: unknown) => value is A & B }
- <A>(predicate1: Predicate<A>, predicate2: Predicate<A>, value: A): boolean
- <A>(predicate1: Predicate<A>, predicate2: Predicate<A>): Predicate<A>
- <A>(predicate1: Predicate<A>): { (predicate2: Predicate<A>, value: A): boolean; (predicate2: Predicate<A>): Predicate<A> }
-
Type parameters
Parameters
-
predicate1: Is<A>
-
predicate2: Is<B>
-
value: unknown
Returns value is A & B
-
Type parameters
Parameters
-
predicate1: Is<A>
-
predicate2: Is<B>
Returns (value: unknown) => value is A & B
-
- (value: unknown): value is A & B
-
Parameters
Returns value is A & B
-
Type parameters
Parameters
Returns { <B>(predicate2: Is<B>, value: unknown): value is A & B; <B>(predicate2: Is<B>): (value: unknown) => value is A & B }
-
- <B>(predicate2: Is<B>, value: unknown): value is A & B
- <B>(predicate2: Is<B>): (value: unknown) => value is A & B
-
Type parameters
Parameters
-
predicate2: Is<B>
-
value: unknown
Returns value is A & B
-
Type parameters
Parameters
Returns (value: unknown) => value is A & B
-
- (value: unknown): value is A & B
-
Parameters
Returns value is A & B
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
-
Type parameters
Parameters
Returns { (predicate2: Predicate<A>, value: A): boolean; (predicate2: Predicate<A>): Predicate<A> }
-
-
Parameters
Returns boolean
-
Parameters
Const any
any
: { <A>
(predicate
: Predicate<A>, list
: keyof A[]): boolean; <A>
(predicate
: Predicate<A>): (list
: keyof A[]) => boolean } = curry(__any) as {<A>(predicate: Predicate<A>, list: readonly A[]): boolean<A>(predicate: Predicate<A>): (list: readonly A[]) => boolean}
Type declaration
-
- <A>(predicate: Predicate<A>, list: keyof A[]): boolean
- <A>(predicate: Predicate<A>): (list: keyof A[]) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (list: keyof A[]) => boolean
-
- (list: keyof A[]): boolean
-
Parameters
Returns boolean
Const anyPass
any
Pass: { <A>(predicates: ReadonlyArray<Predicate<A>>, value: A): boolean; <A>(predicates: ReadonlyArray<Predicate<A>>): (value: A) => boolean } = curry(__anyPass) as {<A>(predicates: ReadonlyArray<Predicate<A>>, value: A): boolean<A>(predicates: ReadonlyArray<Predicate<A>>): (value: A) => boolean}
Type declaration
-
- <A>(predicates: ReadonlyArray<Predicate<A>>, value: A): boolean
- <A>(predicates: ReadonlyArray<Predicate<A>>): (value: A) => boolean
-
Type parameters
Parameters
-
predicates: ReadonlyArray<Predicate<A>>
-
value: A
Returns boolean
-
Type parameters
Parameters
Returns (value: A) => boolean
-
-
Parameters
Returns boolean
Const cond
cond
: { <A, B>
(conditions
: ReadonlyArray<Conditional<A, B>>, value
: A): Maybe<B>; <A, B>
(conditions
: ReadonlyArray<Conditional<A, B>>): (value
: A) => Maybe<B> } = curry(__cond) as {<A, B>(conditions: ReadonlyArray<Conditional<A, B>>, value: A): Maybe<B><A, B>(conditions: ReadonlyArray<Conditional<A, B>>): (value: A) => Maybe<B>}
Type declaration
-
-
Type parameters
Parameters
Returns Maybe<B>
-
Type parameters
Parameters
Returns (value: A) => Maybe<B>
-
-
Parameters
Returns Maybe<B>
Const equals
equals
: Equals = curry(<A>(a: A, b: A) => _equals(a, b, [], [])) as Equals
Const equalsBy
equals
By: { <A, B>(by: Arity1<A, B>, a: A, b: A): boolean; <A, B>(by: Arity1<A, B>, a: A): (b: A) => boolean; <A, B>(by: Arity1<A, B>): { (a: A, b: A): boolean; (a: A): (b: A) => boolean } } = curry(<A, B>(by: Arity1<A, B>, a: A, b: A): boolean => equals(by(a), by(b)))
Type declaration
-
- <A, B>(by: Arity1<A, B>, a: A, b: A): boolean
- <A, B>(by: Arity1<A, B>, a: A): (b: A) => boolean
- <A, B>(by: Arity1<A, B>): { (a: A, b: A): boolean; (a: A): (b: A) => boolean }
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (b: A) => boolean
-
-
Parameters
Returns boolean
-
Type parameters
Parameters
Returns { (a: A, b: A): boolean; (a: A): (b: A) => boolean }
-
- (a: A, b: A): boolean
- (a: A): (b: A) => boolean
-
Parameters
Returns boolean
-
Parameters
Returns (b: A) => boolean
-
-
Parameters
Returns boolean
Const greaterThan
greaterThan: { <A>(right: A, left: A): boolean; <A>(right: A): (left: A) => boolean } = curry(<A>(right: A, left: A) => left > right) as {<A>(right: A, left: A): boolean<A>(right: A): (left: A) => boolean}
Type declaration
-
- <A>(right: A, left: A): boolean
- <A>(right: A): (left: A) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (left: A) => boolean
-
-
Parameters
Returns boolean
Const greaterThanOrEqual
greaterThanOrEqual: { <A>(right: A, left: A): boolean; <A>(right: A): (left: A) => boolean } = curry(<A>(right: A, left: A) => left >= right) as {<A>(right: A, left: A): boolean<A>(right: A): (left: A) => boolean}
Type declaration
-
- <A>(right: A, left: A): boolean
- <A>(right: A): (left: A) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (left: A) => boolean
-
-
Parameters
Returns boolean
Const ifElse
if
Else: IfElseFn = curry(__ifElse) as IfElseFn
Const isBoolean
is
Boolean: Is<boolean> = or(isTrue, isFalse)
isFalse
isFalse: (value: unknown) => value is A
Type declaration
-
- (value: unknown): value is A
-
Parameters
Returns value is A
Const isJson
is
Json: Is<Json> = or(isJsonPrimitive, or(isJsonArray, isJsonObject))
Const isJsonPrimitive
is
JsonPrimitive: Is<JsonPrimitive> = or(isString, or(isNumber, or(isBoolean, isNull)))
Const isNotArray
isNotArray: <B>(value: A | B) => value is B = pipe2(isArray, not) as IsNot<ReadonlyArray<unknown>>
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
Const isNotArrayLike
isNotArrayLike: <B>(value: A | B) => value is B = complement(isArrayLike)
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
Const isNotBoolean
is
NotBoolean: IsNot<boolean> = complement(isBoolean)
Const isNotDate
is
NotDate: IsNot<Date> = complement(isDate)
isNotFalse
isNotFalse: <B>(value: A | B) => value is B
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
Const isNotFunction
is
NotFunction: IsNot<Function> = complement(isFunction)
Const isNotGenerator
isNotGenerator: <B>(value: A | B) => value is B = complement(isGenerator)
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
Const isNotIterable
is
NotIterable: IsNot<Iterable<unknown>> = complement(isIterable)
Const isNotIterator
is
NotIterator: IsNot<Iterator<unknown>> = complement(isIterable)
Const isNotJsonObject
is
NotJsonObject: IsNot<JsonObject> = complement(isJsonObject)
Const isNotMap
is
NotMap: IsNot<Map<unknown, unknown>> = complement(isMap)
isNotNull
isNotNull: <B>(value: A | B) => value is B
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
Const isNotNumber
is
NotNumber: IsNot<number> = complement(isNumber)
Const isNotObject
is
NotObject: IsNot<object> = complement(isObject)
Const isNotPromiseLie
is
NotPromiseLie: IsNot<PromiseLike<unknown>> = complement(isPromiseLike)
Const isNotRecord
is
NotRecord: IsNot<Readonly<Record<PropertyKey, unknown>>> = complement(isRecord)
Const isNotSet
is
NotSet: IsNot<Set<unknown>> = complement(isSet)
Const isNotString
is
NotString: IsNot<string> = complement(isString)
isNotTrue
isNotTrue: <B>(value: A | B) => value is B
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
isNotUndefined
isNotUndefined: <B>(value: A | B) => value is B
Type declaration
-
- <B>(value: A | B): value is B
-
Type parameters
Parameters
Returns value is B
isNull
isNull: (value: unknown) => value is A
Type declaration
-
- (value: unknown): value is A
-
Parameters
Returns value is A
isTrue
isTrue: (value: unknown) => value is A
Type declaration
-
- (value: unknown): value is A
-
Parameters
Returns value is A
isUndefined
isUndefined: (value: unknown) => value is A
Type declaration
-
- (value: unknown): value is A
-
Parameters
Returns value is A
Const lessThan
lessThan: { <A>(right: A, left: A): boolean; <A>(right: A): (left: A) => boolean } = curry(<A>(right: A, left: A) => left < right) as {<A>(right: A, left: A): boolean<A>(right: A): (left: A) => boolean}
Type declaration
-
- <A>(right: A, left: A): boolean
- <A>(right: A): (left: A) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (left: A) => boolean
-
-
Parameters
Returns boolean
Const lessThanOrEqual
lessThanOrEqual: { <A>(right: A, left: A): boolean; <A>(right: A): (left: A) => boolean } = curry(<A>(right: A, left: A) => left <= right) as {<A>(right: A, left: A): boolean<A>(right: A): (left: A) => boolean}
Type declaration
-
- <A>(right: A, left: A): boolean
- <A>(right: A): (left: A) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns (left: A) => boolean
-
-
Parameters
Returns boolean
Const or
or
: { <A, B>
(predicate1
: Is<A>, predicate2
: Is<B>, value
: unknown): value is A | B; <A, B>
(predicate1
: Is<A>, predicate2
: Is<B>): (value
: unknown) => value is A | B; <A>
(predicate1
: Is<A>): { <B>
(predicate2
: Is<B>, value
: unknown): value is A | B; <B>
(predicate2
: Is<B>): Is<A | B> }; <A>
(predicate1
: Predicate<A>, predicate2
: Predicate<A>, value
: A): boolean; <A>
(predicate1
: Predicate<A>, predicate2
: Predicate<A>): Predicate<A>; <A>
(predicate1
: Predicate<A>): { (predicate2
: Predicate<A>, value
: A): boolean; (predicate2
: Predicate<A>): Predicate<A> } } = curry(__or) as {<C, A extends C, B extends C>(predicate1: Is<A>, predicate2: Is<B>, value: C): value is A | B<C, A extends C, B extends C>(predicate1: Is<A>, predicate2: Is<B>): (value: C) => value is A | B<C, A extends C>(predicate1: Is<A>): {<B extends C>(predicate2: Is<B>, value: C): value is A | B<B extends C>(predicate2: Is<B>): (value: C) => value is A | B}<A>(predicate1: Predicate<A>, predicate2: Predicate<A>, value: A): boolean<A>(predicate1: Predicate<A>, predicate2: Predicate<A>): Predicate<A><A>(predicate1: Predicate<A>): {(predicate2: Predicate<A>, value: A): boolean(predicate2: Predicate<A>): Predicate<A>}}
Type declaration
-
- <A, B>(predicate1: Is<A>, predicate2: Is<B>, value: unknown): value is A | B
- <A, B>(predicate1: Is<A>, predicate2: Is<B>): (value: unknown) => value is A | B
- <A>(predicate1: Is<A>): { <B>(predicate2: Is<B>, value: unknown): value is A | B; <B>(predicate2: Is<B>): Is<A | B> }
- <A>(predicate1: Predicate<A>, predicate2: Predicate<A>, value: A): boolean
- <A>(predicate1: Predicate<A>, predicate2: Predicate<A>): Predicate<A>
- <A>(predicate1: Predicate<A>): { (predicate2: Predicate<A>, value: A): boolean; (predicate2: Predicate<A>): Predicate<A> }
-
Type parameters
Parameters
-
predicate1: Is<A>
-
predicate2: Is<B>
-
value: unknown
Returns value is A | B
-
Type parameters
Parameters
-
predicate1: Is<A>
-
predicate2: Is<B>
Returns (value: unknown) => value is A | B
-
- (value: unknown): value is A | B
-
Parameters
Returns value is A | B
-
Type parameters
Parameters
Returns { <B>(predicate2: Is<B>, value: unknown): value is A | B; <B>(predicate2: Is<B>): Is<A | B> }
-
- <B>(predicate2: Is<B>, value: unknown): value is A | B
- <B>(predicate2: Is<B>): Is<A | B>
-
Type parameters
Parameters
-
predicate2: Is<B>
-
value: unknown
Returns value is A | B
-
Type parameters
Parameters
Returns Is<A | B>
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
-
Type parameters
Parameters
Returns { (predicate2: Predicate<A>, value: A): boolean; (predicate2: Predicate<A>): Predicate<A> }
-
-
Parameters
Returns boolean
-
Parameters
Const propEq
propEq: { <K, A, O>(key: K, value: A, object: O): boolean; <K, A>(key: K, value: A): <O>(object: O) => boolean; <K>(key: K): { <A, O>(value: A, object: O): boolean; <A>(value: A): <O>(object: O) => boolean } } = (curry(<O, K extends keyof O>(key: K, value: O[K], obj: O): boolean =>equals(obj[key], value),) as any) as {<K extends PropertyKey, A, O extends Readonly<Record<K, A>>>(key: K, value: A, object: O): boolean<K extends PropertyKey, A>(key: K, value: A): <O extends Readonly<Record<K, A>>>(object: O,) => boolean<K extends PropertyKey>(key: K): {<A, O extends Readonly<Record<K, A>>>(value: A, object: O): boolean<A>(value: A): <O extends Readonly<Record<K, A>>>(object: O) => boolean}}
Type declaration
-
- <K, A, O>(key: K, value: A, object: O): boolean
- <K, A>(key: K, value: A): <O>(object: O) => boolean
- <K>(key: K): { <A, O>(value: A, object: O): boolean; <A>(value: A): <O>(object: O) => boolean }
-
Type parameters
-
K: PropertyKey
-
A
-
O: Readonly<Record<K, A>>
Parameters
-
key: K
-
value: A
-
object: O
Returns boolean
-
Type parameters
Parameters
Returns <O>(object: O) => boolean
-
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns { <A, O>(value: A, object: O): boolean; <A>(value: A): <O>(object: O) => boolean }
-
- <A, O>(value: A, object: O): boolean
- <A>(value: A): <O>(object: O) => boolean
-
Type parameters
Parameters
Returns boolean
-
Type parameters
Parameters
Returns <O>(object: O) => boolean
-
-
Type parameters
Parameters
Returns boolean
Const propOr
propOr: { <A, K>(defaultValue: A, key: K, obj: {}): A; <A, K>(defaultValue: A, key: K): (obj: {}) => A; <A>(defaultValue: A): { <K>(key: K, obj: {}): A; <K>(key: K): (obj: {}) => A } } = curry(__propOr) as {<A, K extends PropertyKey>(defaultValue: A, key: K, obj: { [Key in K]: A }): A<A, K extends PropertyKey>(defaultValue: A, key: K): (obj: { [Key in K]: A }) => A<A>(defaultValue: A): {<K extends PropertyKey>(key: K, obj: { [Key in K]: A }): A<K extends PropertyKey>(key: K): (obj: { [Key in K]: A }) => A}}
Type declaration
-
- <A, K>(defaultValue: A, key: K, obj: {}): A
- <A, K>(defaultValue: A, key: K): (obj: {}) => A
- <A>(defaultValue: A): { <K>(key: K, obj: {}): A; <K>(key: K): (obj: {}) => A }
-
Type parameters
Parameters
-
defaultValue: A
-
key: K
-
obj: {}
Returns A
-
Type parameters
Parameters
Returns (obj: {}) => A
-
Type parameters
Parameters
Returns { <K>(key: K, obj: {}): A; <K>(key: K): (obj: {}) => A }
-
- <K>(key: K, obj: {}): A
- <K>(key: K): (obj: {}) => A
-
Type parameters
Parameters
Returns A
-
Type parameters
Parameters
Returns (obj: {}) => A
Const test
test: Curry2<RegExp, string, boolean> = curry((regex: RegExp, str: string): boolean =>regex.test(str),)
Const toggleOrSet
toggleOrSet: { (bool: boolean | undefined, toggleableBoolean: boolean): boolean; (bool: boolean | undefined): (toggleableBoolean: boolean) => boolean } = curry((bool: boolean | undefined, toggleableBoolean: boolean): boolean =>bool === void 0 ? !toggleableBoolean : bool,) as {(bool: boolean | undefined, toggleableBoolean: boolean): boolean(bool: boolean | undefined): (toggleableBoolean: boolean) => boolean}
Type declaration
-
- (bool: boolean | undefined, toggleableBoolean: boolean): boolean
- (bool: boolean | undefined): (toggleableBoolean: boolean) => boolean
-
Parameters
-
bool: boolean | undefined
-
toggleableBoolean: boolean
Returns boolean
-
Parameters
-
bool: boolean | undefined
Returns (toggleableBoolean: boolean) => boolean
-
- (toggleableBoolean: boolean): boolean
-
Parameters
-
toggleableBoolean: boolean
Returns boolean
@typed/logic