Skip to content

Instantly share code, notes, and snippets.

@balbinus
Created February 21, 2018 09:15
Show Gist options
  • Save balbinus/5fc7697be4c390e4511982c5aa089010 to your computer and use it in GitHub Desktop.
Save balbinus/5fc7697be4c390e4511982c5aa089010 to your computer and use it in GitHub Desktop.
// From Underscore.js 1.8.3 (http://underscorejs.org
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
function _extend(obj)
{
var length = arguments.length;
if (length < 2 || obj == null)
{
return obj;
}
for (var index = 1; index < length; index++)
{
var source = arguments[index],
keys = [];
for (var key in obj)
{
keys.push(key);
}
var l = keys.length;
for (var i = 0; i < l; i++)
{
var key = keys[i];
obj[key] = source[key];
}
}
return obj;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment