nhz.lib
Version:
NHZ Library
17 lines (14 loc) • 344 B
JavaScript
/* object.copy(source) */
var hasProp = {}.hasOwnProperty;
module.exports = function(source) {
var key, result, value;
if (source && source instanceof Object) {
result = {};
for (key in source) {
if (!hasProp.call(source, key)) continue;
value = source[key];
result[key] = value;
}
return result;
}
};