lowdb-encrypted-nativescript-adapter
by brunoziie | v0.1.1
A lowdb adapter for using the database from NativeScript apps.
npm i --save lowdb-encrypted-nativescript-adapter

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