import { map } from '../utilities'; const headProperty = ({ key, value }) => ` ${key}="${value}"`; const headTag = ({ key, value }) => { const child = value.child || ''; delete value.child; return `<${key}${map(value) .map(headProperty) .join('')}>${child}${key}>`; }; const headT = head => map(head).map(headTag); const doc = (head, style, body, additions) => `
${headT(head).join('\n')} ${style}