diff options
Diffstat (limited to 'javascript/videojs/src/js/utils/guid.js')
| -rw-r--r-- | javascript/videojs/src/js/utils/guid.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/javascript/videojs/src/js/utils/guid.js b/javascript/videojs/src/js/utils/guid.js deleted file mode 100644 index 7801251..0000000 --- a/javascript/videojs/src/js/utils/guid.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file guid.js - * @module guid - */ - -// Default value for GUIDs. This allows us to reset the GUID counter in tests. -// -// The initial GUID is 3 because some users have come to rely on the first -// default player ID ending up as `vjs_video_3`. -// -// See: https://github.com/videojs/video.js/pull/6216 -const _initialGuid = 3; - -/** - * Unique ID for an element or function - * - * @type {Number} - */ -let _guid = _initialGuid; - -/** - * Get a unique auto-incrementing ID by number that has not been returned before. - * - * @return {number} - * A new unique ID. - */ -export function newGUID() { - return _guid++; -} - -/** - * Reset the unique auto-incrementing ID for testing only. - */ -export function resetGuidInTestsOnly() { - _guid = _initialGuid; -} |
