UNPKG

osmos-aurelia-api-client

Version:

Osmos api client for aurelia project

34 lines (28 loc) 1.45 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Guid = exports.Guid = function () { function Guid() { _classCallCheck(this, Guid); } _createClass(Guid, null, [{ key: 'New', value: function New() { return Guid._guid(); } }, { key: '_guid', value: function _guid() { return Guid._s4() + Guid._s4() + '-' + Guid._s4() + '-' + Guid._s4() + '-' + Guid._s4() + '-' + Guid._s4() + Guid._s4() + Guid._s4(); } }, { key: '_s4', value: function _s4() { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); } }]); return Guid; }();