dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/defaults/index.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

13 lines
No EOL
277 B
JavaScript

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;
};