mirror of
https://github.com/photonstorm/phaser
synced 2025-01-26 11:55:13 +00:00
805c0a0125
New features: - Parsing text object - Parsing "tiles" prop of tileset which contains collision & terrain information
19 lines
334 B
JavaScript
19 lines
334 B
JavaScript
var HasValue = require('../../../../utils/object/HasValue');
|
|
|
|
var pick = function (object, keys)
|
|
{
|
|
var obj = {};
|
|
|
|
for (var i = 0; i < keys.length; i++)
|
|
{
|
|
var key = keys[i];
|
|
if (HasValue(object, key))
|
|
{
|
|
obj[key] = object[key];
|
|
}
|
|
}
|
|
|
|
return obj;
|
|
};
|
|
|
|
module.exports = pick;
|