function serializeAttributes(attributes) {
  const attrs = keys(attributes);

  return attrs.length ? ' ' + attrs.map((keyName) => {
    const value = attributes[keyName];
    const isFalsy = !value;
    const isDynamic = typeof value === 'object' || typeof value === 'function';

    if (value === true) {
      return keyName;
    }

    return `${keyName}${(!isFalsy && !isDynamic) ? `="${String(value)}"` : ''}`;
  }).join(' ') : '';
}
serializeAttributes

Takes in a diffHTML VTree attributes object and turns it into a key=value
string.

@param {VTreeAttributes} attributes
@return {String}