@n3okill/utils
Version:
Many javascript helpers
12 lines • 427 B
JavaScript
/**
* 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
export function equalInstance(obj, a, b) {
return a instanceof obj && b instanceof obj;
}
//# sourceMappingURL=equalInstance.js.map