<commit_before>import Ember from 'ember';
import config from '../config/environment';

var storageSupported = false;
try { localStorage.test = 2; delete localStorage.test; storageSupported = true; }
catch(err) {}

var cookiesSupported = false;
try { Ember.$.cookie('test', 2); Ember.$.removeCookie('test'); cookiesSupported = true; }
catch(err) {}

var localStorageProvider = {
  get(key) {
    return JSON.parse(localStorage[key] || null);
  },
  set(key, value) {
    if (Ember.isNone(value)) {
      delete localStorage[key];
    } else {
      localStorage[key] = JSON.stringify(value);
    }
    return value;
  }
};

var cookieStorageProvider = {
  get(key) {
    return Ember.$.cookie(key);<commit_msg>fixed issue with invalid localStorage details(token)<commit_after>import Ember from 'ember';
import config from '../config/environment';

var storageSupported = false;
try { localStorage.test = 2; delete localStorage.test; storageSupported = true; }
catch(err) {}

var cookiesSupported = false;
try { Ember.$.cookie('test', 2); Ember.$.removeCookie('test'); cookiesSupported = true; }
catch(err) {}

var localStorageProvider = {
  get(key) {
    try {
      return JSON.parse(localStorage[key] || null);
    } catch(e) {
      return null;
    }
  },
  set(key, value) {
    if (Ember.isNone(value)) {
      delete localStorage[key];
    } else {
      localStorage[key] = JSON.stringify(value);
    }
    return value;
  }
};

var cookieStorageProvider = {
  get(key) {
    return Ember.$.cookie(key);
{'fraction_non_alphanumeric': 0.14890800794176043, 'fraction_numerical': 0.0026472534745201853, 'mean_word_length': 3.7547169811320753, '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': '6411621', 'n_tokens_mistral': 480, 'n_tokens_neox': 474, 'n_words': 110}