(obj: {})
| 376 | * @throws ValueError: If object is `null` or `undefined`. |
| 377 | */ |
| 378 | export function isObjectEmpty(obj: {}): boolean { |
| 379 | if (obj == null) { |
| 380 | throw new ValueError(`Invalid value in obj: ${JSON.stringify(obj)}`); |
| 381 | } |
| 382 | for (const key in obj) { |
| 383 | if (obj.hasOwnProperty(key)) { |
| 384 | return false; |
| 385 | } |
| 386 | } |
| 387 | return true; |
| 388 | } |
| 389 | |
| 390 | /** |
| 391 | * Helper function used to build type union/enum run-time checkers. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…