dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/defaults/index.js

13 lines
277 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01:00
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;
};