mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 19:31:09 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
18 lines
387 B
JavaScript
18 lines
387 B
JavaScript
'use strict';
|
|
|
|
var forEach = Array.prototype.forEach, create = Object.create;
|
|
|
|
var process = function (src, obj) {
|
|
var key;
|
|
for (key in src) obj[key] = src[key];
|
|
};
|
|
|
|
module.exports = function (options/*, …options*/) {
|
|
var result = create(null);
|
|
forEach.call(arguments, function (options) {
|
|
if (options == null) return;
|
|
process(Object(options), result);
|
|
});
|
|
return result;
|
|
};
|