<commit_before>// utility functions

export function getUserId () {
  return getUserProfile().user_id || null
}

export function getUserEmail () {
  return getUserProfile().email || null

}

export function getUserProfile () {
  return JSON.parse(localStorage.getItem('profile') || '{}')
}

export function isAuthenticated () {
  const profile = localStorage.getItem('profile')<commit_msg>Feature 581 bring back fake user (#259)<commit_after>// utility functions

export function getUserId () {
  return getUserProfile().user_id || null
}

export function getUserEmail () {
  return getUserProfile().email || null
}

export function getUserProfile () {
  return JSON.parse(localStorage.getItem('profile') || '{}')
}

export function isAuthenticated () {
  const profile = localStorage.getItem('profile')
{'fraction_non_alphanumeric': 0.12826899128268993, 'fraction_numerical': 0.007471980074719801, 'mean_word_length': 5.28125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6560863', 'n_tokens_mistral': 226, 'n_tokens_neox': 225, 'n_words': 57}