<commit_before>'use strict'

import cookie from 'react-cookies'

export const getToken = () => {
  return cookie.load('ritoplzToken')
}

export const setToken = token => {
  return cookie.save('ritoplzToken', token, { path: '/' })<commit_msg>Add expire date to cookie<commit_after>'use strict'

import cookie from 'react-cookies'

export const getToken = () => {
  return cookie.load('ritoplzToken')
}

export const setToken = token => {
  const now = new Date()
  now.setDate(now.getDate() + 14)

  return cookie.save('ritoplzToken', token, {
    expires: now,
    path: '/'
  })
{'fraction_non_alphanumeric': 0.1482758620689655, 'fraction_numerical': 0.0034482758620689655, 'mean_word_length': 4.1875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5169529', 'n_tokens_mistral': 195, 'n_tokens_neox': 190, 'n_words': 50}