Skip to content

Instantly share code, notes, and snippets.

@marklawlor
Last active August 30, 2016 01:11
Show Gist options
  • Save marklawlor/3718e4f43ae8e084d849d99fe0178c59 to your computer and use it in GitHub Desktop.
Save marklawlor/3718e4f43ae8e084d849d99fe0178c59 to your computer and use it in GitHub Desktop.
var DOM = (selector, context) => (
dom => DOM2 = (selector, content) => (
DOM2.toString = () => dom,
dom += `<${selector}>${content}<\/${selector.split(' ')[0]}>`,
DOM2
))('')
(selector, context)
var DOM=(a,b)=>(c=>f=(d,e)=>(f.toString=()=>c,c+=`<${d}>${e}<\/${d.split(' ')[0]}>`,f))('')(a,b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment