consul/ui-v2/app/utils/model/writable.js

12 lines
227 B
JavaScript
Raw Normal View History

2018-06-06 11:00:25 +00:00
export default function(model, props, attr = {}) {
model.eachAttribute(function(item) {
attr[item] = {
...attr[item],
...{
serialize: props.indexOf(item) !== -1,
},
};
});
return attr;
}