In the source code of serve-static npm library I have seen the following line
options = merge({}, options)
where merge
function is from utils-merge library and it has exactly the following body
exports = module.exports = function(a, b){
if (a && b) {
for (var key in b) {
a[key] = b[key];
}
}
return a;
};
What is the sense of options = merge({}, options)
statement since it just joins options
object with an empty object?