MCPcopy Index your code
hub / github.com/phaserjs/phaser / Pick

Function Pick

src/utils/object/Pick.js:21–36  ·  view source on GitHub ↗
(object, keys)

Source from the content-addressed store, hash-verified

19 * @return {object} A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.
20 */
21var Pick = function (object, keys)
22{
23 var obj = {};
24
25 for (var i = 0; i < keys.length; i++)
26 {
27 var key = keys[i];
28
29 if (HasValue(object, key))
30 {
31 obj[key] = object[key];
32 }
33 }
34
35 return obj;
36};
37
38module.exports = Pick;

Callers 2

ParseObjectFunction · 0.85
Pick.test.jsFile · 0.85

Calls 1

HasValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…