LokiJS – A fast, in-memory document-oriented datastore for node.js, browser and cordova

by Virender
September 14, 2015

LokiJS is an in-memory database which priorities performance over everything *
LokiJS supports field indexing for faster document access and performs really well (near 500,000 ops/s on an average dev machine) on those. Its built-in DynamicView class also enables to utilize indexes on data subsets for even faster performance.

DynamicView has the very handy feature of detecting changes in the database and recomputing itself to contain the most up-to-date data, and data is always readily available through the data() method.

Among the features that make LokiJS attractive are:

  • Fast Performance
  • Replaces SQLite in Cordova, works as a session store in node.js, works an in-browser database with syncing capabilities
  • Indexing / Secondary Indexing / Unique Indexing
  • The “Dynamic View”, a kind of “live filter”
  • Resultset with Fluent API
  • Persistence Adapters (with a built-in IndexedDB and node.js FS adapter)
  • Optional periodic autosave
  • changes API
  • Compound sort for sorting on multiple columns
  • Insert class instances and deserialize/ inflate objects into class instances 
  • partial compatibility with MongoDB API
  • RethinkDB-style Joins

Website http://lokijs.org/

Installation –  

npm install lokijs
bower install lokijs



Notify of
Inline Feedbacks
View all comments

Related posts