modules.define('util.extend', [], function (provide) { 

    function extend () {
        var extendedObject = arguments[0];
        for (var i = 1, l = arguments.length; i < l; i++) {
            var obj = arguments[i];
            for (var key in obj) {
                if (obj.hasOwnProperty(key)) {
                    extendedObject[key] = obj[key];
                }
            }
        }

        return extendedObject;   
    }

    provide(extendedObject);
}); 
modules.define('util.extend', [], function (provide) {

    /**
     * @param {Objec} target
     * @param {Object} source
     * @return {Object} Extended target.
     */
    function extend (target) {
        if (!target) {
            throw new Error('util.extend: Target not found');
        }
        for (var i = 1, l = arguments.length; i < l; i++) {
            var obj = arguments[i];
            for (var property in obj) {
                if (obj.hasOwnProperty(property)) {
                    target[property] = obj[property];
                }
            }
        }
        return target;
    }

    provide(extend);
});

fix provide and add jsdoc