123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Business Analytics (C) Copyright IBM Corp. 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- /**
- * @class UnionAPI
- * @hideconstructor
- * @classdesc Provides access to the the union object associated to this dataitem.
- */
- define([], function () {
- var idCounter = 0;
- var lastIdDate = new Date().valueOf();
- return function () {
- function UniqueId() {
- _classCallCheck(this, UniqueId);
- }
- UniqueId.generate = function generate(prefix) {
- var date = new Date().valueOf();
- if (date !== lastIdDate) {
- idCounter = 0;
- lastIdDate = date;
- } else {
- idCounter++;
- }
- var datePart = ('0000000000000000' + date.toString(16)).slice(-16);
- var countPart = ('00000000' + idCounter.toString(16)).slice(-8);
- return [prefix, datePart, '_', countPart].join('');
- };
- return UniqueId;
- }();
- });
- //# sourceMappingURL=UniqueID.js.map
|