Keyper
Persistence layer/in-memory data store. Inspired by js-data. Written in TypeScript.
Key features
- Immutable objects in the store
- Unique and non-unique indexes
- Strong emphasis on relations. Supports m2m relations and backrefs via getter properties. Supports automatic loading of requested relations once objects were fetched
- Built-in MongoDB-flavored query syntax
- Live collection views, paginated and "Load More" views
Installation
npm install --save keyper
Quick start
Set up Data Source:
// dataSource.ts;;
Set up Collections:
;; ;db.collectionDefaults.sourceClass = RestApiDataSource; ; ;
Query Collections:
// this will fetch all Posts and then all Users that are// related to them as authorsPosts.fetch, .then;