Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/lib. A collection of common utilities I need. www.npmjs.com/package/@samual/lib
Something went wrong. Try again.
12345/** Like `instanceof` but shallow. * @returns whether `object` is a direct instance of the constructor */export const is = <C extends { prototype: any }>(object: any, constructor: C): object is C["prototype"] => object != undefined && Object.getPrototypeOf(object) == constructor.prototype