Collections

All CRUD actions are performed through the collection method with the collection name specified as the parameter.

const todo = await client.collection("todos").post({ title: "Buy milk" });
console.log(todo);

// result:
// {
//   "_id": "60d3b41d3d8b6e5b1f0f3b8c",
//   "title": "Buy milk",
//   "__v": 0
// }

We support five methods for each collection: Get, Post, Patch, Delete and Count.

Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.