Function
isEmptyObject
(obj: Record<string, unknown>)
Source from the content-addressed store, hash-verified
| 9 | * @returns 如果对象为空则返回 true |
| 10 | */ |
| 11 | export function isEmptyObject(obj: Record<string, unknown>): boolean { |
| 12 | if (!obj || typeof obj !== 'object') { |
| 13 | return true |
| 14 | } |
| 15 | return Object.keys(obj).length === 0 && obj.constructor === Object |
| 16 | } |
| 17 | |
| 18 | export function getURLSearchParam(name: string): string { |
| 19 | const searchParams = new URLSearchParams(window.location.search) |
Tested by
no test coverage detected