1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.objectSpread = void 0;
|
4 | /**
|
5 | * @name objectSpread
|
6 | * @summary Concats all sources into the destination
|
7 | */
|
8 | function objectSpread(dest, ...sources) {
|
9 | for (let i = 0, count = sources.length; i < count; i++) {
|
10 | const src = sources[i];
|
11 | if (src) {
|
12 | if (typeof src.entries === 'function') {
|
13 | for (const [key, value] of src.entries()) {
|
14 | dest[key] = value;
|
15 | }
|
16 | }
|
17 | else {
|
18 | Object.assign(dest, src);
|
19 | }
|
20 | }
|
21 | }
|
22 | return dest;
|
23 | }
|
24 | exports.objectSpread = objectSpread;
|