ui
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function union(object) {
|
||||
var _this = this;
|
||||
|
||||
var collection = JSON.parse(JSON.stringify(this.items));
|
||||
|
||||
Object.keys(object).forEach(function (prop) {
|
||||
if (_this.items[prop] === undefined) {
|
||||
collection[prop] = object[prop];
|
||||
}
|
||||
});
|
||||
|
||||
return new this.constructor(collection);
|
||||
};
|
||||
Reference in New Issue
Block a user