open-nomad/ui/app/helpers/merge.js
2023-05-30 09:20:32 -05:00

16 lines
298 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { helper } from '@ember/component/helper';
function merge(positional) {
return positional.reduce((accum, val) => {
accum = { ...val, ...accum };
return accum;
}, {});
}
export default helper(merge);