UNPKG
@baaz/adapter
Version:
latest (1.0.6)
1.0.6
1.0.5
1.0.4
1.0.3
The core runtime of PWA
github.com/dominicg666/baaz-adapter
dominicg666/baaz-adapter
@baaz/adapter
/
util
/
isObjectEmpty.js
10 lines
(9 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * Returns whether the given object is empty ({}). *
@see
https://stackoverflow.com/a/32108184. * *
@param
{
Object
}
obj
- the object under test. */
export
default
function
isObjectEmpty
(
obj
) {
return
Object
.
keys
(obj).
length
===
0
&& obj.
constructor
===
Object
; }