UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

28 lines 940 B
import packageJson from '../package.json'; export let 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 || (Events = {})); export 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 packageJson.version; } } //# sourceMappingURL=utils.js.map