Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Adds bower file and prepares the 0.0.3 pre-release. #13

Merged
merged 1 commit into from

1 participant

@cirocosta
Owner

Don't adds nothing really new, just build the newer built version and prepares for the bower registration.

@cirocosta cirocosta merged commit ea2fc2d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
22 bower.json
@@ -0,0 +1,22 @@
+{
+ "name": "storage-utils-js",
+ "version": "0.0.3",
+ "homepage": "https://github.com/cirocosta/storage-utils-js",
+ "authors": [
+ "Ciro S. Costa <ciro.costa@usp.br>"
+ ],
+ "description": "Simple helper for webstorage",
+ "main": "src/storage-utils.js",
+ "keywords": [
+ "webstorage",
+ "javascript",
+ "web"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "spec"
+ ]
+}
View
2  build/storage-utils-0.0.2.min.js
@@ -1,2 +1,2 @@
-/* storage-utils - version 0.0.2 - 06-02-2014 */
+/* storage-utils - version 0.0.2 - 28-02-2014 */
function DatabaseTable(a,b){if(!a||"undefined"==typeof a)throw"DatabaseTable(table_name) needs a valid name";this.storage="undefined"==typeof b?localStorage:sessionStorage,this.table_name=a,this.parsed_table=null,this._parseDatabaseTable()}DatabaseTable.prototype._parseDatabaseTable=function(){try{this.parsed_table=JSON.parse(this.storage[this.table_name])}catch(a){this.parsed_table=[]}return this.parsed_table},DatabaseTable.prototype._saveState=function(){this.storage[this.table_name]=JSON.stringify(this.parsed_table)},DatabaseTable.prototype.deleteObjectFromPosition=function(a){return this.parsed_table&&a>-1?(this.parsed_table.splice(a,1),this._saveState(),!0):!1},DatabaseTable.prototype.deleteObject=function(a){if(this.parsed_table&&null!==a){for(var b=-1,c=0;c<this.parsed_table.length;c++)if(this.parsed_table[c]===a){b=c,this.deleteObjectFromPosition(b);break}return b}return-1},DatabaseTable.prototype.getById=function(a,b){"undefined"==typeof b&&(b="id");for(var c in this.parsed_table){var d=this.parsed_table[c];if(d[b].toString()===a.toString())return d}return null},DatabaseTable.prototype.getObjectPosition=function(a){if(this.parsed_table)for(var b=0;b<this.parsed_table.length;b++)if(this.parsed_table[b]===a)return b;return-1},DatabaseTable.prototype.putObject=function(a,b){return("undefined"==typeof b||b===!1)&&(a._id=(new Date).getTime()),this.parsed_table.push(a),this._saveState(),a},DatabaseTable.prototype.updateObject=function(a){if(this.parsed_table){if("undefined"!=typeof a){var b=this.getObjectPosition(a);return b>-1?(this.parsed_table[b]=a,this._saveState(),!0):!1}return!1}return this.putObject(a)},DatabaseTable.prototype.getAll=function(){return this.parsed_table?this.parsed_table:void 0};
View
2  build/storage-utils-0.0.3.min.js
@@ -0,0 +1,2 @@
+/* storage-utils - version 0.0.3 - 28-02-2014 */
+function DatabaseTable(a,b){if(!a||"undefined"==typeof a)throw"DatabaseTable(table_name) needs a valid name";this.storage="undefined"==typeof b?localStorage:sessionStorage,this.table_name=a,this.parsed_table=null,this._parseDatabaseTable()}DatabaseTable.prototype._parseDatabaseTable=function(){try{this.parsed_table=JSON.parse(this.storage[this.table_name])}catch(a){this.parsed_table=[]}return this.parsed_table},DatabaseTable.prototype._saveState=function(){this.storage[this.table_name]=JSON.stringify(this.parsed_table)},DatabaseTable.prototype.deleteObjectFromPosition=function(a){return this.parsed_table&&a>-1?(this.parsed_table.splice(a,1),this._saveState(),!0):!1},DatabaseTable.prototype.deleteObject=function(a){if(this.parsed_table&&null!==a){for(var b=-1,c=0;c<this.parsed_table.length;c++)if(this.parsed_table[c]===a){b=c,this.deleteObjectFromPosition(b);break}return b}return-1},DatabaseTable.prototype.getById=function(a,b){"undefined"==typeof b&&(b="id");for(var c in this.parsed_table){var d=this.parsed_table[c];if(d[b].toString()===a.toString())return d}return null},DatabaseTable.prototype.getObjectPosition=function(a){if(this.parsed_table)for(var b=0;b<this.parsed_table.length;b++)if(this.parsed_table[b]===a)return b;return-1},DatabaseTable.prototype.putObject=function(a,b){return("undefined"==typeof b||b===!1)&&(a._id=(new Date).getTime()),this.parsed_table.push(a),this._saveState(),a},DatabaseTable.prototype.updateObject=function(a){if(this.parsed_table){if("undefined"!=typeof a){var b=this.getObjectPosition(a);return b>-1?(this.parsed_table[b]=a,this._saveState(),!0):!1}return!1}return this.putObject(a)},DatabaseTable.prototype.getAll=function(){return this.parsed_table?this.parsed_table:void 0};
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "storage-utils",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "Simple helper for webstorage",
"repository": {
"type": "git",
Something went wrong with that request. Please try again.