Function
merge (original, updates) Object public
Module: | @ember/polyfills |
---|
Defined in packages/ember-metal/lib/merge.js:4
import { merge } from '@ember/polyfills';
- original
- Object
- The object to merge into
- updates
- Object
- The object to copy properties from
- returns
- Object
Merge the contents of two objects together into the first object.
import { merge } from '@ember/polyfills'; merge({ first: 'Tom' }, { last: 'Dale' }); // { first: 'Tom', last: 'Dale' } var a = { first: 'Yehuda' }; var b = { last: 'Katz' }; merge(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/functions/@ember%2Fpolyfills/merge