lowdb-encrypted-nativescript-adapter
v0.1.1
Published
A lowdb adapter for using the database from NativeScript apps.
Downloads
7
Maintainers
Readme
Lowdb Encrypted NativeScript Adapter
A lowdb adapter for using the database from NativeScript apps.
All data will be encrypted before save using a autogenerated secret key.
Installation
Run the following command from the root of your project:
npm install --save lowdb-encrypted-nativescript-adapter
Example
TypeScript
import * as lowdb from "lowdb";
import * as NativeScriptEncryptedAdapter from "lowdb-encrypted-nativescript-adapter";
const adapter = new NativeScriptAdapter('db.json');
const db = lowdb<lowdb.AdapterSync>(adapter);
JavaScript
const lowdb = require("lowdb");
const NativeScriptEncryptedAdapter = require("lowdb-encrypted-nativescript-adapter");
const adapter = new NativeScriptEncryptedAdapter('db.json');
const db = lowdb(adapter);
Based from ludwiktrammer/lowdb-nativescript-adapter