UNPKG

nhz.lib

Version:
17 lines (14 loc) 344 B
/* 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; } };