mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
Added NULL OP
This commit is contained in:
parent
c8b40de29c
commit
70cf842b8c
2 changed files with 25 additions and 1 deletions
23
src/utils/NULL.js
Normal file
23
src/utils/NULL.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2022 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A NULL OP callback function.
|
||||
*
|
||||
* This function always returns `null`.
|
||||
*
|
||||
* Used internally by Phaser when it's more expensive to determine if a callback exists
|
||||
* than it is to just invoke an empty function.
|
||||
*
|
||||
* @function Phaser.Utils.NULL
|
||||
* @since 3.60.0
|
||||
*/
|
||||
var NULL = function ()
|
||||
{
|
||||
return null;
|
||||
};
|
||||
|
||||
module.exports = NULL;
|
|
@ -14,6 +14,7 @@ module.exports = {
|
|||
Base64: require('./base64/'),
|
||||
Objects: require('./object/'),
|
||||
String: require('./string/'),
|
||||
NOOP: require('./NOOP')
|
||||
NOOP: require('./NOOP'),
|
||||
NULL: require('./NULL')
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue