{"id":26482496,"url":"https://github.com/drew-y/depot-db","last_synced_at":"2026-04-18T14:32:34.007Z","repository":{"id":42341727,"uuid":"119892624","full_name":"drew-y/depot-db","owner":"drew-y","description":"Embedded database for TypeScript projects","archived":false,"fork":false,"pushed_at":"2022-12-30T20:19:46.000Z","size":423,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T04:14:21.254Z","etag":null,"topics":["database","db","depot","embedded","embedded-database","javascript","leveldb","nodejs","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drew-y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-01T20:56:20.000Z","updated_at":"2021-08-10T19:23:36.000Z","dependencies_parsed_at":"2023-01-31T15:45:56.814Z","dependency_job_id":null,"html_url":"https://github.com/drew-y/depot-db","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/drew-y/depot-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew-y%2Fdepot-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew-y%2Fdepot-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew-y%2Fdepot-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew-y%2Fdepot-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drew-y","download_url":"https://codeload.github.com/drew-y/depot-db/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew-y%2Fdepot-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31972334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","db","depot","embedded","embedded-database","javascript","leveldb","nodejs","typescript"],"created_at":"2025-03-20T04:14:03.485Z","updated_at":"2026-04-18T14:32:33.992Z","avatar_url":"https://github.com/drew-y.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Depot DB\n\nAn embedded database for typescript and nodejs. Built as a tiny wrapper around leveldb.\n\n## Overview\n\nDepot DB is a performant database designed for embedded projects and low traffic web apps.\n\nIt has a different, yet familiar query language. Typescript.\n\nIn depot the \"where\" is a function that is passed all of the documents in the db.\nIf the function returns true, the document is added to the collection, otherwise\nit is ignored.\n\nThe same goes for \"sort\". The sort function is passed two documents (\"a\" and \"b\") and returns\na number determining which one goes first. If the sort function returns a number greater than\nzero \"a\" is at a higher index than \"b\", less than zero and \"b\" comes first. If it returns 0\nthey \"a\" and \"b\" equivelent.\n\n## Installation\n\n```bash\nnpm i --save depot-db\n```\n\n## Basic Usage\n\n```typescript\nimport { Depot } from \"depot-db\";\n\n// Define a document type\ntype Person = { firstname: string, lastname: string, age: number };\n\n// Initialize a people database (Stored in /databases/people)\nconst people = new Depot\u003cPerson\u003e(\"/databases/people\");\n\n// Store some people\npeople.put(\"John\", { firstname: \"John\", lastname: \"Doe\", age: 32 });\npeople.put(\"Jane\", { firstname: \"Jane\", lastname: \"Doe\", age: 32 });\npeople.put(\"Tim\", { firstname: \"Tim\", lastname: \"Burton\", age: 59 });\npeople.put(\"Tony\", { firstname: \"Stark\", lastname: \"Doe\", age: 45 });\n\n// Query people\npeople.find({\n    where: person =\u003e person.age \u003e 32\n}).then(personsOlderThat32 =\u003e {\n    // personsOlderThat32 = [\n    //     { firstname: \"Tim\", lastname: \"Burton\", age: 61 },\n    //     { firstname: \"Stark\", lastname: \"Doe\", age: 53 }\n    // ];\n});\n\n// Find a person by their key (rejects if person is not found)\npeople.get(\"John\").then(/** { firstname: \"John\", lastname: \"Doe\", age: 32 } */);\n```\n\n## API\n\nAPI documentation can be found [here](https://youngwerth.gitlab.io/depot)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrew-y%2Fdepot-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrew-y%2Fdepot-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrew-y%2Fdepot-db/lists"}