phaser/v3/src/gameobjects/tilemap/parsers/parsetiledjson/Pick.js
Michael Hadley 805c0a0125 Break Tiled parser into modular pieces & extended capabilities
New features:
- Parsing text object
- Parsing "tiles" prop of tileset which contains collision & terrain information
2017-11-24 08:22:55 -06:00

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;