forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHasValue.js
More file actions
23 lines (21 loc) · 672 Bytes
/
Copy pathHasValue.js
File metadata and controls
23 lines (21 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Determine whether the source object has a property with the specified key.
*
* @function Phaser.Utils.Objects.HasValue
* @since 3.0.0
*
* @param {object} source - The source object to be checked.
* @param {string} key - The property to check for within the object
*
* @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`.
*/
var HasValue = function (source, key)
{
return (source.hasOwnProperty(key));
};
module.exports = HasValue;