<commit_before>///LocalStorage wrapper with signals and simple interface
LocalStorage {
	signal loaded;			///< json was loaded
	signal optionUpdated;	///< option changed signal

	/// load JSON method
	load: {
		this.read()
		this.loaded()
	}

	/**@param name:string property name
	returns JSON proeprty value by name*/
	getValue(name): {
		this.name = name
		var res
		try {
			res = JSON.parse(this.value)
		} catch(e) {
			res = this.value
		}
		return res
	}

	/**@param name:string property name
	@param value:Object property value
	save JSON property 'name' with value 'value'*/
	setValue(name, value): {
		this.name = name
		this.value = JSON.stringify(value)
		this.optionUpdated(name, value)
	}

	///@private
	onCompleted: { this.load() }
}
<commit_msg>Remove useless serialization and deserialization in JsonStorage<commit_after>///LocalStorage wrapper with signals and simple interface
LocalStorage {
	signal loaded;			///< json was loaded
	signal optionUpdated;	///< option changed signal

	/// load JSON method
	load: {
		this.read()
		this.loaded()
	}

	/**@param name:string property name
	returns JSON proeprty value by name*/
	getValue(name): {
		this.name = name
		return this._storage.getItem(this.name)
	}

	/**@param name:string property name
	@param value:Object property value
	save JSON property 'name' with value 'value'*/
	setValue(name, value): {
		this.name = name
		this.init()
		this._storage.setItem(name, value)
		this.optionUpdated(name, value)
	}

	///@private
	onCompleted: { this.load() }
}

{'fraction_non_alphanumeric': 0.12385321100917432, 'fraction_numerical': 0.0, 'mean_word_length': 3.5993975903614457, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4078497', 'n_tokens_mistral': 514, 'n_tokens_neox': 483, 'n_words': 145}