@monstermann/fn
Version:
A utility library for TypeScript.
26 lines • 601 B
TypeScript
//#region src/object/isObject.d.ts
/**
* `isObject(target)`
*
* Checks if `target` is a plain object.
*
* ```ts
* isObject({ a: 1 }); // true
* isObject([]); // false
* isObject(null); // false
* isObject("hello"); // false
* ```
*
* ```ts
* pipe({ a: 1 }, isObject()); // true
* pipe([], isObject()); // false
* pipe(null, isObject()); // false
* pipe("hello", isObject()); // false
* ```
*/
declare const isObject: {
(): (target: unknown) => target is Record<PropertyKey, unknown>;
(target: unknown): target is Record<PropertyKey, unknown>;
};
//#endregion
export { isObject };