mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
13 lines
331 B
TypeScript
13 lines
331 B
TypeScript
export function isObject(obj: any) {
|
|
const type = typeof obj;
|
|
return type === 'function' || type === 'object' && !!obj;
|
|
}
|
|
|
|
export function isEmptyObject(obj: any) {
|
|
return !!obj && Object.keys(obj).length === 0;
|
|
}
|
|
|
|
export function isString(str: string) {
|
|
return Object.prototype.toString.call(str) === "[object String]";
|
|
}
|