Added Shallow Object clone.

This commit is contained in:
Richard Davey 2017-05-10 02:25:32 +01:00
parent 345a77a2fe
commit 050948aa28
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,13 @@
var Clone = function (obj)
{
var clone = {};
for (var key in obj)
{
clone[key] = obj[key];
}
return clone;
};
module.exports = Clone;

View file

@ -2,6 +2,7 @@
module.exports = {
Clone: require('./Clone'),
Extend: require('./Extend'),
GetAdvancedValue: require('./GetAdvancedValue'),
GetMinMaxValue: require('./GetMinMaxValue'),