mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Added Shallow Object clone.
This commit is contained in:
parent
345a77a2fe
commit
050948aa28
2 changed files with 14 additions and 0 deletions
13
v3/src/utils/object/Clone.js
Normal file
13
v3/src/utils/object/Clone.js
Normal 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;
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module.exports = {
|
||||
|
||||
Clone: require('./Clone'),
|
||||
Extend: require('./Extend'),
|
||||
GetAdvancedValue: require('./GetAdvancedValue'),
|
||||
GetMinMaxValue: require('./GetMinMaxValue'),
|
||||
|
|
Loading…
Reference in a new issue