@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 439 B
TypeScript
//#region src/object/isEmpty.d.ts
/**
* `isEmpty(target)`
*
* Checks if `target` object has no enumerable properties.
*
* ```ts
* isEmpty({}); // true
* isEmpty({ a: 1 }); // false
* ```
*
* ```ts
* pipe({}, isEmpty()); // true
* pipe({ a: 1 }, isEmpty()); // false
* ```
*/
declare const isEmpty: {
(): <T extends object>(target: T) => boolean;
<T extends object>(target: T): boolean;
};
//#endregion
export { isEmpty };