@mattperlscode/local-dbdeprecated

A tool to help manage local databases

Usage no npm install needed!

<script type="module">
  import mattperlscodeLocalDb from 'https://cdn.skypack.dev/@mattperlscode/local-db';
</script>

README

local-db

local-db is a tool to help manage local databases


WARNING: this package is not complete and should be used with discretion


Getting started:

  • npm install @mattperls-code/local-db

In your code:

  • import { db } from "@mattperlscode/local-db"
  • const database = new db("path/to/file")

Reading Data:

  • database.getData({start: number, end: number})

This method reads that database file. You can specify what line to start and what line to end.

Writing Data:

  • database.addData({data: object | array, santize: boolean, index: number})

This method writes to the database file. You can control what object is added, whether or not to sanitize it, and what index to write it at in the database.

Remove Data:

  • database.removeData({start: number, end: number})

This method removed data from the database file. You can specify a start index and an end index to be removed.

Want to contribute or maintain this package?

Contact me at mattperls.code@gmail.com