blob: cb7d75c9c6beb023dc7117d3ddae3eaba4962375 [file] [log] [blame]
var clone = require('clone');
module.exports = function(options, defaults) {
options = options || {};
Object.keys(defaults).forEach(function(key) {
if (typeof options[key] === 'undefined') {
options[key] = clone(defaults[key]);
}
});
return options;
};