nginxconfig.io/src/nginxconfig/util/delegated_from_defaults.js

11 lines
274 B
JavaScript

export default (defaults) => {
return Object.keys(defaults).reduce((prev, key) => {
prev[key] = {
value: defaults[key].default,
computed: defaults[key].default,
...defaults[key],
};
return prev;
}, {});
};