<commit_before>IndexedDB Plugin for JQuery
===========================


*Warning! This is not at all production ready!*


Why A JQuery Plugin
---

* ### Complexity is Bad
The IndexedDB as a technology is awesome but the JavaScript API is really 
[ugly and daunting](http://www.html5rocks.com/en/tutorials/indexeddb/todo/ "Heres why"). 
This could be 'ok' for any other language, but not Javascript.
So heres an abstraction library that JS developers need. And deserve.

* ###  Callbacks are Ugly
The API heavily relies on arcane callbacks which lead to horrible, repetitive spaghetti code. 
Modern JS APIs need to use promises.

* ### Abstraction is Good
  Ideally, this how IndexedDB should work
  ```javascript

  	//Define and initialize an IndexedDB ...
	var db = $.idb({
						name:'foobar', 
						version: 2,
						drop: stores_to_be_deleted,
						stores:list_of_stores
					});

	// ... Add items to a store
	db.put(items, 'into_store').done(onsuccess);

	//.. And delete items from a store
	db.remove('from_store', conditionFunc).done(onremoval);

  ```
Just the right amount of abstraction, Promises using `$.Deferred` would make this API 
as beautiful and as joyful to use as it should've been.


License
---
This library will available under the <commit_msg>Adding select() syntax to README<commit_after>IndexedDB Plugin for JQuery
===========================


*Warning! This is not at all production ready!*


Why A JQuery Plugin
---

* ### Complexity is Bad
The IndexedDB as a technology is awesome but the JavaScript API is really 
[ugly and daunting](http://www.html5rocks.com/en/tutorials/indexeddb/todo/ "Heres why"). 
This could be 'ok' for any other language, but not Javascript.
So heres an abstraction library that JS developers need. And deserve.

* ###  Callbacks are Ugly
The API heavily relies on arcane callbacks which lead to horrible, repetitive spaghetti code. 
Modern JS APIs need to use promises.

* ### Abstraction is Good
  Ideally, this how IndexedDB should work
  ```javascript

  	//Define and initialize an IndexedDB ...
	var db = $.idb({
						name:'foobar', 
						version: 2,
						drop: stores_to_be_deleted,
						stores:list_of_stores
					});

	// ... Add objects to a store
	db.put(items, 'into_store').done(onsuccess);

	//.. And delete objects from a store
	db.remove('from_store', conditionFunc).done(onremoval);

	//.. And not to forget fetching objects from a store
	db.select('from_my_store', conditionFunc).done(function (items){

		console.log(items)
	});

  ```
Just the right amount of abstraction, Promises using `$.Deferred` would make this API 
as beautiful and as joyful to use as it should've been.


License
---
This library will available under the 
{'fraction_non_alphanumeric': 0.1138121546961326, 'fraction_numerical': 0.0014732965009208103, 'mean_word_length': 3.682758620689655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3533097', 'n_tokens_mistral': 896, 'n_tokens_neox': 797, 'n_words': 323}