UNPKG

381 BJavaScriptView Raw
1// Copyright 2017-2022 @polkadot/util authors & contributors
2// SPDX-License-Identifier: Apache-2.0
3
4/**
5 * @name objectSpread
6 * @summary Concats all sources into the destination
7 */
8export function objectSpread(dest, ...sources) {
9 for (let i = 0; i < sources.length; i++) {
10 const src = sources[i];
11
12 if (src) {
13 Object.assign(dest, src);
14 }
15 }
16
17 return dest;
18}
\No newline at end of file