define(["require", "exports"], function (require, exports) {
    "use strict";
    function checkProperties(a, b) {
        for (var propName in a) {
            if (a.hasOwnProperty(propName)) {
                if (!b.hasOwnProperty(propName) || (b[propName] !== a[propName])) {
                    return false;
                }
            }
        }
        return true;
    }
    // Compare a to b and b to a
    function shallowCompare(a, b) {
        return checkProperties(a, b) && checkProperties(b, a);
    }
    exports.shallowCompare = shallowCompare;
    // Assign function.
    function assign(target) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        target = target || {};
        for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
            var sourceObject = args_1[_a];
            if (sourceObject) {
                for (var propName in sourceObject) {
                    if (sourceObject.hasOwnProperty(propName)) {
                        target[propName] = sourceObject[propName];
                    }
                }
            }
        }
        return target;
    }
    exports.assign = assign;
});
