function isEmpty()

in deprecated-react-native-listview/isEmpty.js [13:24]


function isEmpty(obj: mixed): boolean {
  if (Array.isArray(obj)) {
    return obj.length === 0;
  } else if (typeof obj === 'object') {
    for (const i in obj) {
      return false;
    }
    return true;
  } else {
    return !obj;
  }
}