mirror of https://github.com/hashicorp/consul
10 lines
187 B
JavaScript
10 lines
187 B
JavaScript
|
// Used to make an pojo 'attr-able'
|
||
|
// i.e. you can call pojo.attr('key') on it
|
||
|
export default function(obj) {
|
||
|
return {
|
||
|
attr: function(prop) {
|
||
|
return obj[prop];
|
||
|
},
|
||
|
};
|
||
|
}
|