marko/runtime/helper-merge.js
2017-01-02 15:53:38 -07:00

16 lines
377 B
JavaScript

/**
* Merges object properties
* @param {[type]} object [description]
* @param {[type]} source [description]
* @return {[type]} [description]
*/
function merge(into, source) {
for (var k in source) {
if (source.hasOwnProperty(k) && !into.hasOwnProperty(k)) {
into[k] = source[k];
}
}
return into;
}
module.exports = merge;