github.com/outbrain/consul@v1.4.5/ui-v2/app/utils/get-component-factory.js (about) 1 export default function(owner, key = '-view-registry:main') { 2 const components = owner.lookup(key); 3 return function(el) { 4 const id = el.getAttribute('id'); 5 if (id) { 6 return components[id]; 7 } 8 }; 9 }