code: function checkHeaders(stream, item) {
      var headers, ret = true;
      if (!stream.parsedHeaders) {
          stream.parsedHeaders = true;
          headers = stream.headers = gatherHeaders(item);
          stream.headersLength = headers.length;
      }
      if (!stream.hasWrittenHeaders) {
          stream.totalCount++;
          stream.push(Buffer.from(stream.formatter(stream.headers, true), "utf8"));
          stream.hasWrittenHeaders = true;
          ret = isHashArray(item) || !isArray(item);
      }
      return ret;
  }
docs: check if we need to write header return true if we should also write a row could be false if headers is true and the header row(first item) is passed in