UNPKG

google-map-react

Version:

isomorphic google map react component, allows render react components on the google map

20 lines (16 loc) 726 B
'use strict'; exports.__esModule = true; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var isEmpty = function isEmpty(val) { // check for empty object {}, array [] if (val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') { if (Object.keys(val).length === 0) { return true; } } else if (val === null || val === undefined || val === '') { // check for undefined, null and "" return true; } return false; }; exports.default = isEmpty;