github.com/DerekStrickland/consul@v1.4.5/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  }