You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/app/utils/http/create-headers.js

12 lines
276 B

export default function() {
return function(lines) {
return lines.reduce(function(prev, item) {
const [key, ...value] = item.split(':');
if (value.length > 0) {
prev[key.trim()] = value.join(':').trim();
}
return prev;
}, {});
};
}