
support async component, see: https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
6 lines
221 B
TypeScript
6 lines
221 B
TypeScript
// https://stackoverflow.com/a/32108184/10924593
|
|
export function objectIsEmpty(obj: Record<string, unknown>): boolean {
|
|
return obj
|
|
&& Object.keys(obj).length === 0
|
|
&& Object.getPrototypeOf(obj) === Object.prototype
|
|
} |