export default function(selector, fn){ let dom = document.querySelector(selector) if(dom){ return fn(dom) } }