PDF_Generation_and_Automation/node_modules/defaults/index.js
2025-08-24 12:01:08 +05:30

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