github.com/Aestek/consul@v1.2.4-0.20190309222502-b2c31e33971a/ui-v2/app/utils/makeAttrable.js (about) 1 // Used to make an pojo 'attr-able' 2 // i.e. you can call pojo.attr('key') on it 3 export default function(obj) { 4 return { 5 attr: function(prop) { 6 return obj[prop]; 7 }, 8 }; 9 }