<commit_before>/**
@Name: sb.storage
@Author: <NAME>
@Description: used to store data clientside.  Uses localStorage if it exists 
Safari, Chrome, Firefox, IE 8+ or UserData IE 6,7 or cookies if neither is available
*/
sb.storage = function(params){
	sb.objects.infuse(params, this);
	this.name = this.name || 'sb_storage';

	if('localStorage' in window && window['localStorage'] !== null){
		this.storage = new sb.storage.local(window.location.host);
	} else if(typeof document.body.style.behavior == 'string'){
		this.storage = new sb.storage.userData(this.name);
	} else {
		sb.include('cookies');
		this.storage = sb.cookies;
	}
};

/**
@Name: sb.storage.prototype
@Author: <NAME><commit_msg>added code example to constructor<commit_after>/**
@Name: sb.storage
@Author: <NAME>
@Description: used to store data clientside.  Uses localStorage if it exists 
Safari, Chrome, Firefox, IE 8+ or UserData IE 6,7 or cookies if neither is available
var s = new sb.storage();
s.set('name', 'paul');
s.get('name');
*/
sb.storage = function(params){
	sb.objects.infuse(params, this);
	this.name = this.name || 'sb_storage';

	if('localStorage' in window && window['localStorage'] !== null){
		this.storage = new sb.storage.local(window.location.host);
	} else if(typeof document.body.style.behavior == 'string'){
		this.storage = new sb.storage.userData(this.name);
	} else {
		sb.include('cookies');
		this.storage = sb.cookies;
	}
};

/**
@Name: sb.storage.prototype
@Author: <NAME>
{'fraction_non_alphanumeric': 0.16260162601626016, 'fraction_numerical': 0.0040650406504065045, 'mean_word_length': 4.724806201550388, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2671262', 'n_tokens_mistral': 509, 'n_tokens_neox': 490, 'n_words': 132}