{"id":32226741,"url":"https://github.com/fixjs/asyncdb.js","last_synced_at":"2025-10-22T09:56:11.313Z","repository":{"id":30562607,"uuid":"34117486","full_name":"fixjs/asyncdb.js","owner":"fixjs","description":"An async client database","archived":false,"fork":false,"pushed_at":"2019-05-23T09:49:28.000Z","size":16,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T09:56:10.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/fixjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-17T13:15:44.000Z","updated_at":"2018-04-11T18:22:44.000Z","dependencies_parsed_at":"2022-08-31T00:12:10.313Z","dependency_job_id":null,"html_url":"https://github.com/fixjs/asyncdb.js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fixjs/asyncdb.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixjs%2Fasyncdb.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixjs%2Fasyncdb.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixjs%2Fasyncdb.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixjs%2Fasyncdb.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fixjs","download_url":"https://codeload.github.com/fixjs/asyncdb.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixjs%2Fasyncdb.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280416597,"owners_count":26327044,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"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":[],"created_at":"2025-10-22T09:56:10.295Z","updated_at":"2025-10-22T09:56:11.306Z","avatar_url":"https://github.com/fixjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncDB\n\nAsyncDB is a lightweight wrapper on top of [async-local-storage](https://github.com/slightlyoff/async-local-storage) which allows to have a simple and async `localStorage` without having to deal with as said: all the [performance hazards of localStorage.](https://blog.mozilla.org/tglek/2012/02/22/psa-dom-local-storage-considered-harmful/).\n\nAll credits goes to [async-local-storage](https://github.com/slightlyoff/async-local-storage) API and of course [lodash](https://lodash.com/).\n\n## Installation\n\nInstall with [Bower](http://bower.io):\n\n```\nbower install --save asyncdb\n```\n\nThe component can be used as a CommonJS module, an AMD module, or a global.\n\n## API\nTo use AsyncDB in your JavaScript code, you could simply add it as a script tag:\n\n```html\n\u003cscript src=\"asyncdb.js\"\u003e\u003c/script\u003e\n```\nOr require it as an AMD or CommonJS module. Then you could use it like:\n\n```javascript\nvar AsyncDB = require('asyncdb'),\n  db = AsyncDB.load(['users', 'apps']);\n\ndb.users.insert({  })\n  .then(function(userId){\n    \n  });\n\ndb.users.findOne({  })\n  .then(function(user){\n    \n  });\n\ndb.apps.findOne({  })\n  .then(function(app){\n    \n  });\n```\n\nor using `ES6` function generators and `yield` keyword and a helper library like [DefineJS](https://github.com/fixjs/define.js) or [co](https://github.com/tj/co):\n\n```javascript\nvar userId = yield db.users.insert({ });\n\nvar user = yield db.users.findOne({ });\n\nvar app = yield db.apps.findOne({ });\n```\n\nIt is all about making it easy to store offline data in the browser.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixjs%2Fasyncdb.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffixjs%2Fasyncdb.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixjs%2Fasyncdb.js/lists"}