sticky-horse
Version:
With StickyHorse allow your users to send feedback to your team.
14 lines (13 loc) • 432 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUserId = void 0;
var getUserId = function () {
// Generate a random user ID if none exists
var userId = localStorage.getItem('userId');
if (!userId) {
userId = "user_".concat(Math.random().toString(36).substr(2, 9));
localStorage.setItem('userId', userId);
}
return userId;
};
exports.getUserId = getUserId;
;