Added NULL OP

This commit is contained in:
Richard Davey 2022-11-24 00:42:04 +00:00
parent c8b40de29c
commit 70cf842b8c
2 changed files with 25 additions and 1 deletions

23
src/utils/NULL.js Normal file
View 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;

View file

@ -14,6 +14,7 @@ module.exports = {
Base64: require('./base64/'),
Objects: require('./object/'),
String: require('./string/'),
NOOP: require('./NOOP')
NOOP: require('./NOOP'),
NULL: require('./NULL')
};