UNPKG

@n3okill/utils

Version:
15 lines 536 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.equalInstance = equalInstance; /** * Check if two objects are instances of the same class. * @param {Function} obj - Function - The constructor of the object you want to compare. * @param {T} a - T * @param {U} b - U extends T * @returns true */ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type function equalInstance(obj, a, b) { return a instanceof obj && b instanceof obj; } //# sourceMappingURL=equalInstance.js.map