Function

Available since v3.2.2

original
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.

1
2
3
4
5
6
import { assign } from '@ember/polyfills';

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