mirror of https://github.com/hashicorp/consul
12 lines
223 B
JavaScript
12 lines
223 B
JavaScript
|
export default function(prop) {
|
||
|
return function(value) {
|
||
|
if (typeof value === 'undefined' || value === null || value === '') {
|
||
|
return {};
|
||
|
} else {
|
||
|
return {
|
||
|
[prop]: value,
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
}
|