#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# File: src/utils/Utils.js

    function Utils(){}

    module.exports = Utils;

    /**
     * Extend an options object with default values.
     * @static
     * @method defaults
     * @param  {object} options The options object. May be falsy: in this case, a new object is created and returned.
     * @param  {object} defaults An object containing default values.
     * @return {object} The modified options object.
     */
    Utils.defaults = function(options, defaults){
        options = options || {};

        for(var key in defaults){
            if(!(key in options)){
                options[key] = defaults[key];
            }
        }

        return options;
    };