JSPM

@hazae41/decibel

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q43108F
  • License MIT

Queriable in-memory database for TypeScript

Package Exports

  • @hazae41/decibel

Readme

Decibel

Queriable in-memory database for TypeScript

npm i @hazae41/decibel

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies
  • NoSQL-like querying

Usage

const db = new Database()

db.append({
  id: 1n,
  name: "John",
  age: 30n,
  job: "Engineer",
  certifications: ["AWS", "Azure", "GCP"]
})

db.append({
  id: 2n,
  name: "Jane",
  age: 30n,
  job: "Engineer",
  certifications: ["AWS", "Azure", "Docker"]
})

/**
 * Find people whose job is `Engineer` and who have the `GCP` certification, order by ascending age, then order by descending id if they have the same age
 */
const [john] = db.get({ age: "ascending", id: "descending" }, { job: "Engineer", certifications: ["GCP"] })