{"id":21031306,"url":"https://github.com/workable/idb","last_synced_at":"2025-08-02T00:33:34.851Z","repository":{"id":43993423,"uuid":"240237091","full_name":"Workable/idb","owner":"Workable","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-12T15:17:13.000Z","size":1805,"stargazers_count":0,"open_issues_count":17,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-13T19:45:46.069Z","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/Workable.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-13T10:47:14.000Z","updated_at":"2020-03-04T21:50:58.000Z","dependencies_parsed_at":"2025-01-20T15:33:39.990Z","dependency_job_id":null,"html_url":"https://github.com/Workable/idb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Workable/idb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Workable%2Fidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Workable%2Fidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Workable%2Fidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Workable%2Fidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Workable","download_url":"https://codeload.github.com/Workable/idb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Workable%2Fidb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268317796,"owners_count":24231424,"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-08-01T02:00:08.611Z","response_time":67,"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":"2024-11-19T12:27:10.746Z","updated_at":"2025-08-02T00:33:34.769Z","avatar_url":"https://github.com/Workable.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# idb\n\nA simple cache mechanisms that is based on IndexDB.\n\n## Installing\n\nUsing npm:\n\n```\n$ npm install @workablehr/idb\n```\n\n## Basic usage\n\n```javascript\nimport makeIDB from \"@workablehr/idb\";\n\nconst idb = makeIDB(\"workable-store\");\nidb.get(\"myKey\", { fetch: performFetch, maxAge: 100 });\n// if 'myKey' does not exists, it fetches and stores the result for 100 seconds\n```\n\n## API\n\n```javascript\nimport makeIDB from \"@workablehr/idb\";\nconst { store, set, get, clear, del } = makeIDB(\"workable-store\");\n```\n\nAll the actions are namespaced by the store name.\n\n### set (key, value)\n\nSets the an entry in the indexed db\n\n### get (key, {fetch, maxAge})\n\nGets a value from the indexed db.\nIf the value does not exists, it calls the `fetch` function and stores the\nresult for `maxAge` period.\n\n### clear\n\nClears all the entries that are owned by the `workable-store`\n\n### del (key)\n\nDeletes a specific entry in the index db.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkable%2Fidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkable%2Fidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkable%2Fidb/lists"}