loki-async-reference-adapter

1.0.0 • Public • Published

loki-async-reference adapter

A Simple async adapter for LokiJS, suitable to use with React Native. Based off of LokiFSStructuredAdapter.

Usage Examples

Basic usage within a React Native project

import loki from "lokijs";
import { LokiAsyncReferenceAdapter } from "loki-async-reference-adapter";
import AsyncStorage from '@react-native-async-storage/async-storage';

const db = new loki('mydb', {
    adapter: new LokiAsyncReferenceAdapter({
      read: AsyncStorage.getItem,
      write: AsyncStorage.setItem,
    }),
  });

Readme

Keywords

none

Package Sidebar

Install

npm i loki-async-reference-adapter

Weekly Downloads

157

Version

1.0.0

License

ISC

Unpacked Size

7.33 kB

Total Files

5

Last publish

Collaborators

  • jonnyreeves