{"id":25300164,"url":"https://github.com/aurijs/jason","last_synced_at":"2025-05-16T18:06:38.899Z","repository":{"id":259948989,"uuid":"876684007","full_name":"aurijs/jason","owner":"aurijs","description":"Slash database complexity away with jason.","archived":false,"fork":false,"pushed_at":"2025-03-26T21:44:02.000Z","size":343,"stargazers_count":173,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-16T18:06:19.750Z","etag":null,"topics":["bun","database","json","lighweight","no-dependencies","node"],"latest_commit_sha":null,"homepage":"http://jasondb.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aurijs.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["aurijs"],"open_collective":"jasondb"}},"created_at":"2024-10-22T11:44:24.000Z","updated_at":"2025-05-02T03:52:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"284d0520-f1e2-4c03-817b-f7254b164487","html_url":"https://github.com/aurijs/jason","commit_stats":null,"previous_names":["realfakenerd/jason","aurijs/jason"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurijs%2Fjason","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurijs%2Fjason/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurijs%2Fjason/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurijs%2Fjason/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aurijs","download_url":"https://codeload.github.com/aurijs/jason/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582905,"owners_count":22095518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bun","database","json","lighweight","no-dependencies","node"],"created_at":"2025-02-13T05:44:28.809Z","updated_at":"2025-05-16T18:06:38.880Z","avatar_url":"https://github.com/aurijs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/aurijs","https://opencollective.com/jasondb"],"categories":[],"sub_categories":[],"readme":"# jason db 📦\n\n![image with logo and name of package](./static/markdown-image.png)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/your/repo/graphs/commit-activity)\n[![Made with Bun](https://img.shields.io/badge/Bun-%23000000.svg?style=flat\u0026logo=bun\u0026logoColor=white)](https://bun.sh)\n![Node Current](https://img.shields.io/node/v/%40aurios%2Fjason?style=flat\u0026logo=node.js\u0026labelColor=000)\n[![TypeScript](https://img.shields.io/badge/TypeScript-%23007ACC.svg?style=flat\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n![npm bundle size](https://img.shields.io/bundlephobia/min/%40aurios%2Fjason?style=flat)\n![NPM Downloads](https://img.shields.io/npm/dw/%40aurios%2Fjason?style=flat\u0026logo=npm)\n![GitHub Repo stars](https://img.shields.io/github/stars/realfakenerd/jason)\n\n\u003e 🚀 A simple, lightweight, and embeddable JSON database built with Bun\n\njason is the perfect solution when you need a fast and easy-to-use JSON database in your Bun projects. With features like schema validation, concurrency control, and built-in caching, it provides everything you need in a simple package.\n\n## ✨ Highlights\n\n- 📝 **Simple API** - CRUD and query JSON documents with just a few lines of code\n- 🪶 **Lightweight \u0026 Embeddable** - Easy integration without adding bloat to your project\n- ✅ **Schema Validation** - Ensure your data integrity\n- 🔒 **Concurrency Control** - Prevent update conflicts\n- 📚 **Versioning Support** - Track document changes\n- ⚡ **Built-in Caching** - Improve read performance\n- 🔍 **Query System** - Find documents with custom criteria\n\n## 🚀 Installation\n\n```sh\nbun add -D jason\n\n# or\n\nnpm i @aurios/jason\n```\n\n## 💻 Quick Example\n\n```typescript\nimport JasonDB from \"jason\";\n\n// Define your interfaces\ninterface User {\n  name: string;\n  email: string;\n}\n\ninterface Database {\n  users: User[];\n}\n\n// Initialize the database\nconst db = new JasonDB\u003cDatabase\u003e(\"my-db\");\n\n// Create a collection\nconst users = await db.collection(\"users\", {\n  schema: (user) =\u003e user.name \u0026\u0026 user.email.includes(\"@\"),\n});\n\n// Use the simple API\nawait users.create({\n  name: \"John Smith\",\n  email: \"john@example.com\",\n});\n```\n\n## 🛠️ Core API\n\n### 📦 JasonDB\n\n```typescript\n// Create an instance\nconst db = new JasonDB(\"my-database\");\n\n// Access collections\nconst myCollection = db.collection(\"name\");\n\n// List collections\nconst collections = await db.listCollections();\n```\n\n### 📑 Collections\n\n```typescript\n// Create\nconst doc = await collection.create({ ... });\n\n// Read\nconst item = await collection.read(\"id\");\n\n// Update\nawait collection.update(\"id\", { field: \"new value\" });\n\n// Delete\nawait collection.delete(\"id\");\n\n// Query\nconst results = await collection.query(doc =\u003e doc.age \u003e 18);\n```\n\n## 🤝 Contributing\n\nContributions are welcome!\n\n1. 🍴 Fork the project\n2. 🔧 Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. 📝 Commit your changes (`git commit -m 'Add: amazing feature'`)\n4. 📤 Push to the branch (`git push origin feature/AmazingFeature`)\n5. 🔍 Open a Pull Request\n\n## 🛠 Development\n\n```sh\n# Clone the repo\ngit clone https://github.com/realfakenerd/jason\n\n# Install dependencies \nbun install\n\n# Run tests\nbun test\n\n# Build project\nbun run build\n\n```\n\n## 📄 License\n\nDistributed under the [MIT License](../LICENSE)\n\n---\n\n⭐ If this project helped you, consider giving it a star!\n📫 Questions? Open an issue or get in touch!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurijs%2Fjason","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurijs%2Fjason","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurijs%2Fjason/lists"}