You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
565 B

/*
* node-rdkafka - Node.js wrapper for RdKafka C/C++ library
*
* Copyright (c) 2016 Blizzard Entertainment
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE.txt file for details.
*/
var util = module.exports = {};
util.shallowCopy = function (obj) {
if (!util.isObject(obj)) { return obj; }
var copy = {};
for (var k in obj) {
if (obj.hasOwnProperty(k)) {
copy[k] = obj[k];
}
}
return copy;
};
util.isObject = function (obj) {
return obj && typeof obj === 'object';
};