Function

assign (target, args) Object public

Module: @ember/polyfills
import { assign } from '@ember/polyfills';
target
Object
The object to assign into
args
Object
The objects to copy properties from
returns
Object

Copy properties from a source object to a target object. Source arguments remain unchanged.

import { assign } from '@ember/polyfills';

var a = { first: 'Yehuda' };
var b = { last: 'Katz' };
var c = { company: 'Other Company' };
var d = { company: 'Tilde Inc.' };
assign(a, b, c, d); // a === { first: 'Yehuda', last: 'Katz', company: 'Tilde Inc.' };

© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/3.25/functions/@ember%2Fpolyfills/assign