13 lines
No EOL
277 B
JavaScript
Executable file
13 lines
No EOL
277 B
JavaScript
Executable file
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;
|
|
}; |