UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

37 lines (36 loc) 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Events = exports.CourierUtils = void 0; var _package = _interopRequireDefault(require("../package.json")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } let Events; exports.Events = Events; (function (_Events) { let Log; (function (_Log) { const DEBUG_LOG = _Log.DEBUG_LOG = 'courierDebugEvent'; })(Log || (Log = _Events.Log || (_Events.Log = {}))); let Push; (function (_Push) { const CLICKED = _Push.CLICKED = 'pushNotificationClicked'; const DELIVERED = _Push.DELIVERED = 'pushNotificationDelivered'; })(Push || (Push = _Events.Push || (_Events.Push = {}))); })(Events || (exports.Events = Events = {})); class CourierUtils { static generateUUID() { let uuid = ''; const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const charactersLength = characters.length; for (let i = 0; i < 16; i++) { uuid += characters.charAt(Math.floor(Math.random() * charactersLength)); } return uuid; } static getPackageVersion() { return _package.default.version; } } exports.CourierUtils = CourierUtils; //# sourceMappingURL=utils.js.map