UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

28 lines (27 loc) 892 B
import packageJson from '../package.json'; export var Events; (function (Events) { let Log; (function (Log) { Log.DEBUG_LOG = 'courierDebugEvent'; })(Log = Events.Log || (Events.Log = {})); let Push; (function (Push) { Push.CLICKED = 'pushNotificationClicked'; Push.DELIVERED = 'pushNotificationDelivered'; })(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; } }