{"id":14155088,"url":"https://github.com/shahradelahi/storage-box","last_synced_at":"2025-05-15T11:04:28.496Z","repository":{"id":214365996,"uuid":"736326204","full_name":"shahradelahi/storage-box","owner":"shahradelahi","description":"💾 A Memory-based key-value storage system for JavaScript.","archived":false,"fork":false,"pushed_at":"2025-05-12T17:10:03.000Z","size":198,"stargazers_count":446,"open_issues_count":11,"forks_count":9,"subscribers_count":3,"default_branch":"canary","last_synced_at":"2025-05-14T00:41:53.313Z","etag":null,"topics":["browser","database","key-value","nodejs","storage"],"latest_commit_sha":null,"homepage":"https://npmjs.com/storage-box","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/shahradelahi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-27T15:48:53.000Z","updated_at":"2025-04-25T00:24:23.000Z","dependencies_parsed_at":"2024-02-16T03:21:42.324Z","dependency_job_id":"707b9e02-c672-49b7-90f4-d116486748a5","html_url":"https://github.com/shahradelahi/storage-box","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"8c549b5c2dad37217b006bf15cef94883e7399b5"},"previous_names":["shahradelahi/storage-box"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fstorage-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fstorage-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fstorage-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fstorage-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahradelahi","download_url":"https://codeload.github.com/shahradelahi/storage-box/tar.gz/refs/heads/canary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254091779,"owners_count":22013286,"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":["browser","database","key-value","nodejs","storage"],"created_at":"2024-08-17T08:01:49.215Z","updated_at":"2025-05-15T11:04:28.440Z","avatar_url":"https://github.com/shahradelahi.png","language":"TypeScript","funding_links":[],"categories":["browser"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\u003csup\u003eStorageBox\u003c/sup\u003e\n\u003cbr\u003e\n\u003ca href=\"https://github.com/shahradelahi/storage-box/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/shahradelahi/storage-box/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/storage-box\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/storage-box\" alt=\"npm\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagephobia.now.sh/result?p=storage-box\"\u003e\u003cimg src=\"https://packagephobia.now.sh/badge?p=storage-box\" alt=\"npm bundle size\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\" alt=\"MIT\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n_storage-box_ is a JavaScript library designed for the purpose of storing data in various structures across multiple\nstorage systems. The primary goal of this library is to offer a straightforward and effective method for data storage.\n\n## 👀 Features\n\n- Simple API\n- Support for **Node.js**, **Bun** and the **browser**\n- Support for multiple storage types (Memory, File, Browser-storage, etc.)\n- Multiple data structures (Literals, Hashes, Lists, etc.)\n- Time-based key expiration\n\n## ⚙️ Installation\n\n```bash\nnpm i storage-box\n```\n\n## 📖 Usage\n\n```typescript\nimport { Client } from 'storage-box';\n\nconst client = new Client();\n\nclient.setex('key', 'value', 2);\n\nconsole.log(client.get('key')); // value\n\n// time to live in milliseconds\nconsole.log(client.ttl('key', true)); // 2000\n\n// after 3 seconds\nsetTimeout(() =\u003e {\n  console.log(client.get('key')); // undefined\n}, 3e3);\n```\n\n## 📦 Storage Types\n\n- Memory ([Docs](docs/driver-memory.md)) (default)\n- File-based (Fs) ([Docs](docs/driver-fs.md))\n- Local/Session Storage ([Docs](docs/driver-browser.md))\n\n## 📚 Documentation\n\nFor all configuration options, please see [the API docs](https://paka.dev/npm/storage-box/api).\n\n## 🤝 Contributing\n\nYou can contribute to this project by opening an issue or a pull request\non [GitHub](https://github.com/shahradelahi/storage-box). Feel free to contribute, we care about your ideas and\nsuggestions.\n\n## Project Stats\n\n![Alt](https://repobeats.axiom.co/api/embed/e1a9aca6e883cd81bba207c4edb9713c24796edd.svg 'Repobeats analytics image')\n\n## License\n\n[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fstorage-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahradelahi%2Fstorage-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fstorage-box/lists"}