@themrdev/json.db

0.2.0 • Public • Published

json.db

Simple JSON database for Bun.js

[!WARNING] This package is still in development and only works with Bun.js

Creating a database

import { Database } from ".";

const db = new Database({
  dir: "./db", // where the database will be stored
});

Schemas and Models

import { Database, SchemaTypes } from ".";

// Basic usage of the database with a schema
const PostSchema = db.createSchema({
  name: "post",
  fields: [
    {
      name: "title",
      type: SchemaTypes.String,
    },
    {
      name: "content",
      type: SchemaTypes.String,
    },
  ],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @themrdev/json.db

Weekly Downloads

0

Version

0.2.0

License

none

Unpacked Size

45.6 kB

Total Files

15

Last publish

Collaborators

  • themrdev