MCPcopy Index your code
hub / github.com/google-map-react/google-map-react / isEmpty

Function isEmpty

src/utils/isEmpty.js:1–12  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

1const isEmpty = (val) => {
2 // check for empty object {}, array []
3 if (val !== null && typeof val === 'object') {
4 if (Object.keys(val).length === 0) {
5 return true;
6 }
7 } else if (val === null || val === undefined || val === '') {
8 // check for undefined, null and ""
9 return true;
10 }
11 return false;
12};
13
14export default isEmpty;

Callers 3

constructorMethod · 0.85
componentDidUpdateMethod · 0.85
GoogleMapClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected