Creating a Base

First, create a Base instance to start working with your data:

const myBase = db.Base("my-awesome-base")

Adding Data

Single Item (PUT)

const item = {
    name: "Contiguity",
    is_awesome: true,
    coolness_level: 9000
}
await myBase.put(item, "unique-key-1")

Multiple Items (PUT Many)

const items = [
    { name: "Item 1", value: 100 },
    { name: "Item 2", value: 200 }
]
await myBase.putMany(items)

Reading Data (GET)

const item = await myBase.get("unique-key-1")
console.log(item.name) // Outputs: Contiguity

Updating Data (PATCH)

await myBase.update({
    coolness_level: 9001
}, "unique-key-1")

Deleting Data (DELETE)

await myBase.delete("unique-key-1")