@resk/core
Version:
An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla
17 lines (16 loc) • 574 B
TypeScript
/**
* Checks if the provided value is a class.
*
* A value is considered a class if it is a function, has a prototype, and its prototype's constructor is the same as the value itself.
*
* @param {any} variable The value to check.
* @returns {boolean} True if the value is a class, false otherwise.
* @example
* ```typescript
* class MyClass {}
* console.log(isClass(MyClass)); // Output: true
* console.log(isClass({})); // Output: false
* console.log(isClass(function() {})); // Output: false
* ```
*/
export default function isClass(variable: any): boolean;