mirror of https://github.com/status-im/consul.git
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];
|
||
|
},
|
||
|
};
|
||
|
}
|