Skip to content

Instantly share code, notes, and snippets.

/*
* Note: this code is for Angular.js v1.3 or earlier
* In Angular.js v1.4+ you can use angular.merge()
*
* Extends the destination object `dst` by copying all of the properties from the `src` object(s)
* to `dst`. You can specify multiple `src` objects.
* @param {Boolean} deep If true, the merge becomes recursive (optional aka deep copy)
* @param {Object} dst Destination object.
* @param {Object} src Source object(s).
* @returns {Object} Reference to `dst`.