UNPKG

@angular/flex-layout

Version:
35 lines 1.2 kB
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Extends an object with the *enumerable* and *own* properties of one or more source objects, * similar to Object.assign. * * @param dest The object which will have properties copied to it. * @param sources The source objects from which properties will be copied. */ export function extendObject(dest) { var sources = []; for (var _i = 1; _i < arguments.length; _i++) { sources[_i - 1] = arguments[_i]; } if (dest == null) { throw TypeError('Cannot convert undefined or null to object'); } for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) { var source = sources_1[_a]; if (source != null) { for (var key in source) { if (source.hasOwnProperty(key)) { dest[key] = source[key]; } } } } return dest; } //# sourceMappingURL=/usr/local/google/home/tinagao/WebstormProjects/caretaker/flex-layout/src/lib/utils/object-extend.js.map