Module

x/rambda/mod.ts>propIs

Faster and smaller alternative to Ramda
Latest
function propIs
import { propIs } from "https://dotland.deno.dev/x/rambda@9.4.1/mod.ts";

It returns true if property of obj is from target type.

Type Parameters

C extends AnyFunction
K extends keyof any

Parameters

type: C
name: K
obj: any

Returns

obj is Record<K, ReturnType<C>>

Type Parameters

C extends AnyConstructor
K extends keyof any

Parameters

type: C
name: K
obj: any

Returns

obj is Record<K, InstanceType<C>>

Type Parameters

C extends AnyFunction
K extends keyof any

Parameters

type: C
name: K

Returns

(obj: any) => obj is Record<K, ReturnType<C>>

Type Parameters

C extends AnyConstructor
K extends keyof any

Parameters

type: C
name: K

Returns

(obj: any) => obj is Record<K, InstanceType<C>>

Type Parameters

C extends AnyFunction

Returns

{ <K extends keyof any>(name: K, obj: any): obj is Record<K, ReturnType<C>>; <K extends keyof any>(name: K): (obj: any) => obj is Record<K, ReturnType<C>>; }