Skip to content

vshjxyz/Indexed-localStorageDB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

Indexed localStorageDB

a simple, tiny database layer for localStorage

Documentation: http://kailashnadh.name/code/localstoragedb Licensed under the MIT license.

Usage / Examples

Refer to the documentation for the whole CRUD, just change the createTable:

...
// create the "books" table
lib.createTable("books",
		["id", "title", "author", "year", "copies"],
		["id", "title"] // Add an array as the 3rd parameter with the name of the column that you want to index
		);
...
}

After the creation, each insert/update goes also to affect the indexes.

The performances for medium/large data extraction/update from/to your localStorage will raise significantly.

Tests / Performance gain

Check this link http://jsperf.com/indexed-localstoragedb/14 to see the performance gain at his best

About

A simple database layer for localStorage with indexes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%