@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
19 lines (18 loc) • 641 B
TypeScript
/**
* Checks if the provided value is empty.
*
* A value is considered empty if it is null, undefined, an empty string, or an empty array.
*
* @param {any} value The value to check.
* @returns {boolean} True if the value is empty, false otherwise.
* @example
* ```typescript
* console.log(isEmpty(null)); // Output: true
* console.log(isEmpty(undefined)); // Output: true
* console.log(isEmpty('')); // Output: true
* console.log(isEmpty([])); // Output: true
* console.log(isEmpty('hello')); // Output: false
* console.log(isEmpty([1, 2, 3])); // Output: false
* ```
*/
export default function isEmpty(value: any): boolean;