code: function isEmpty(value: mixed): boolean {
    if (Array.isArray(value)) {
      return value.length === 0;
    } else if (typeof value === 'object') {
      if (value) {
        invariant(
          !isIterable(value) || value.size === undefined,
          'isEmpty() does not support iterable collections.',
        );
        for (const _ in value) {
          return false;
        }
      }
      return true;
    } else {
      return !value;
    }
  }
docs: Checks if a value is empty.