<commit_before>storage.js
===============

wrapper for localStorage and sessionStorage that returns true values

#### Usage

##### set and get
```
Storage.Session.set("foo", "bar");
Storage.Session.get("foo");
// returns "bar"

Storage.Local.set("my_array", [1,2,3,4]);
Storage.Local.get("my_array");
// [1,2,3,4]

Storage.Session.set("my_object", {
  foo: "bar",
  an_array: [1,2,3],
  year: 2012
});
Storage.Session.get("my_object");
// {
//   foo: "bar",
//   an_array: [1,2,3],
//   year: 2012
// }


Storage.Local.set("age", 33);
Storage.Local.get("age");
// returns the number 33
```

##### remove
removes an item
```
Storage.Session.remove("my_object");
Storage.Local.remove("my_array");
```

##### clear
clears all items
```
Storage.Session.clear();
Storage.Local.clear();
```

##### list
lists all items in Storage in the console
```
Storage.Session.list();
Storage.Local.list();
```

#### TODO
- add Storage.Cookie
- handle storage limit errors
- add support to request more storage
<commit_msg>Update master<commit_after>storage.js
===============

wrapper for localStorage and sessionStorage that returns true values

#### Usage

##### set and get
```
Storage.Session.set("foo", "bar");
Storage.Session.get("foo");
// returns "bar"

Storage.Local.set("my_array", [1,2,3,4]);
Storage.Local.get("my_array");
// [1,2,3,4]

Storage.Session.set("my_object", {
  foo: "bar",
  an_array: [1,2,3],
  year: 2012
});
Storage.Session.get("my_object");
// {
//   foo: "bar",
//   an_array: [1,2,3],
//   year: 2012
// }


Storage.Local.set("age", 33);
Storage.Local.get("age");
// returns the number 33
```

##### remove
removes an item
```
Storage.Session.remove("my_object");
Storage.Local.remove("my_array");
```

##### clear
clears all items
```
Storage.Session.clear();
Storage.Local.clear();
```

##### list
lists all items in Storage in the console
```
Storage.Session.list();
Storage.Local.list();
```

#### TODO
- handle storage limit errors
- add support to request more storage
- handle storage events
{'fraction_non_alphanumeric': 0.2231610337972167, 'fraction_numerical': 0.02584493041749503, 'mean_word_length': 4.515068493150685, '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': '2381979', 'n_tokens_mistral': 734, 'n_tokens_neox': 679, 'n_words': 162}