MCPcopy
hub / github.com/phaserjs/phaser / GetFastValue

Function GetFastValue

src/utils/object/GetFastValue.js:19–35  ·  view source on GitHub ↗
(source, key, defaultValue)

Source from the content-addressed store, hash-verified

17 * @return {*} The value if found; otherwise, defaultValue (null if none provided)
18 */
19var GetFastValue = function (source, key, defaultValue)
20{
21 var t = typeof(source);
22
23 if (!source || t === 'number' || t === 'string')
24 {
25 return defaultValue;
26 }
27 else if (source.hasOwnProperty(key) && source[key] !== undefined)
28 {
29 return source[key];
30 }
31 else
32 {
33 return defaultValue;
34 }
35};
36
37module.exports = GetFastValue;

Callers 15

FitToRegionFunction · 0.85
GridAlignFunction · 0.85
ScenePlugin.jsFile · 0.85
GetScenePluginsFunction · 0.85
GetPhysicsPluginsFunction · 0.85
TweenBuilderFunction · 0.85
addTargetFunction · 0.85
NumberTweenBuilderFunction · 0.85
CanvasSnapshotFunction · 0.85
WebGLSnapshotFunction · 0.85
Tilemap.jsFile · 0.85
GetTilesWithinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…