<commit_before>﻿module JustinCredible.SampleApp.Services {

    /**
     * Provides a way to easily get/set user preferences.
     * 
     * The current backing store is local storage and/or session storage:
     * https://cordova.apache.org/docs/en/3.0.0/cordova_storage_storage.md.html#localStorage
     */
    export class Preferences {

        public static ID = "Preferences";

        //#region Local Storage Keys

        private static USER_ID = "USER_ID";
        private static USER_NAME = "USER_NAME";
        private static USER_EMAIL = "USER_EMAIL";
        private static TOKEN = "TOKEN";
        private static PIN = "PIN";
        private static CATEGORY_ORDER = "CATEGORY_ORDER";

        //#endregion

        //#region User ID/Name/Email/Token

        get userId(): string {
            return localStorage.getItem(Preferences.USER_ID);
        }

        set userId(value: string) {
            if (value == null) {
                localStorage.removeItem(Preferences.USER_ID);
            }
            else {
                localStorage.setItem(Preferences.USER_ID, value);
            }
        }

        get token(): string {
            return localStorage.getItem(Preferences.TOKEN);
        }

        set token(value: string) {
            if (value == null) {
                localStorage.removeItem(Preferences.TOKEN);<commit_msg>Add Configuration.ts and migrate items from Preferences.ts<commit_after>﻿module JustinCredible.SampleApp.Services {

    /**
     * Provides a way to easily get/set user preferences.
     * 
     * The current backing store is local storage and/or session storage:
     * https://cordova.apache.org/docs/en/3.0.0/cordova_storage_storage.md.html#localStorage
     */
    export class Preferences {

        public static ID = "Preferences";

        //#region Local Storage Keys

        private static USER_ID = "USER_ID";
        private static TOKEN = "TOKEN";
        private static PIN = "PIN";
        private static CATEGORY_ORDER = "CATEGORY_ORDER";

        //#endregion

        //#region User ID/Token

        get userId(): string {
            return localStorage.getItem(Preferences.USER_ID);
        }

        set userId(value: string) {
            if (value == null) {
                localStorage.removeItem(Preferences.USER_ID);
            }
            else {
                localStorage.setItem(Preferences.USER_ID, value);
            }
        }

        get token(): string {
            return localStorage.getItem(Preferences.TOKEN);
        }

        set token(value: string) {
            if (value == null) {
                localStorage.removeItem(Preferences.TOKEN);
{'fraction_non_alphanumeric': 0.09684684684684684, 'fraction_numerical': 0.0022522522522522522, 'mean_word_length': 1.9253567508232712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6584045', 'n_tokens_mistral': 727, 'n_tokens_neox': 707, 'n_words': 171}