UNPKG

@yookue/ts-lang-utils

Version:

Common lang utilities for typescript

9 lines 323 B
import _typeof from "@babel/runtime/helpers/esm/typeof"; export function isPrototype(object) { if (_typeof(object) !== 'object') { return false; } var constructor = object.constructor; var prototype = typeof constructor === 'function' ? constructor.prototype : object.prototype; return object === prototype; }