options.js 246 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 module.exports = function options(opts, defaults) { if (!opts) { opts = {} } var result = {} if (!opts) { opts = {} } for (var key in defaults) { result[key] = typeof opts[key] != 'undefined' ? opts[key] : defaults[key] } return result }