diff --git a/src/core/utils/index.js b/src/core/utils/index.js index 0d8a7ff..400e4af 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -1,6 +1,7 @@ import { RETINA_PREFIX, DATA_URI, URL_FILE_EXTENSION, SVG_SIZE, VERSION } from '../const'; import EventEmitter from 'eventemitter3'; import pluginTarget from './pluginTarget'; +import * as isMobile from 'ismobilejs'; let nextUid = 0; let saidHello = false; @@ -8,7 +9,7 @@ /** * @namespace PIXI.utils */ -export { EventEmitter, pluginTarget }; +export { EventEmitter, pluginTarget, isMobile }; /** * Gets the next unique identifier diff --git a/src/core/utils/index.js b/src/core/utils/index.js index 0d8a7ff..400e4af 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -1,6 +1,7 @@ import { RETINA_PREFIX, DATA_URI, URL_FILE_EXTENSION, SVG_SIZE, VERSION } from '../const'; import EventEmitter from 'eventemitter3'; import pluginTarget from './pluginTarget'; +import * as isMobile from 'ismobilejs'; let nextUid = 0; let saidHello = false; @@ -8,7 +9,7 @@ /** * @namespace PIXI.utils */ -export { EventEmitter, pluginTarget }; +export { EventEmitter, pluginTarget, isMobile }; /** * Gets the next unique identifier diff --git a/test/core/util.js b/test/core/util.js index c5d7f9d..75c2a07 100755 --- a/test/core/util.js +++ b/test/core/util.js @@ -298,4 +298,25 @@ expect(arr).to.be.deep.equal(res); }); }); + + describe('EventEmitter', function () + { + it('should exist', function () + { + expect(PIXI.utils.EventEmitter).to.be.a('function'); + }); + }); + + describe('isMobile', function () + { + it('should exist', function () + { + expect(PIXI.utils.isMobile).to.be.an('object'); + }); + + it('should return a boolean for .any', function () + { + expect(PIXI.utils.isMobile.any).to.be.a('boolean'); + }); + }); });