Function

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.

1
2
3
4
5
6
7
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.' };