guid-f4f03a7a.js 511 B

123456789101112131415161718192021
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.97
  5. */
  6. 'use strict';
  7. function gen(counts) {
  8. return counts
  9. .map((count) => {
  10. let out = "";
  11. for (let i = 0; i < count; i++) {
  12. out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
  13. }
  14. return out;
  15. })
  16. .join("-");
  17. }
  18. const guid = () => gen([2, 1, 1, 1, 3]);
  19. exports.guid = guid;