{"id":22117170,"url":"https://github.com/uni-helper/localforage-adapter","last_synced_at":"2025-07-25T10:33:11.639Z","repository":{"id":203258496,"uuid":"709187800","full_name":"uni-helper/localForage-adapter","owner":"uni-helper","description":"适用于 uni-app 的 localForage 适配器","archived":false,"fork":false,"pushed_at":"2025-07-22T03:07:33.000Z","size":253,"stargazers_count":6,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T05:22:45.672Z","etag":null,"topics":["localforage","sqlite","sqlite-android","sqlite-ios","uniapp","unistorage"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@uni-helper/localforage-adapter","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/uni-helper.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,"zenodo":null},"funding":{"github":["ModyQyW","KeJunMao","Neil Lee"],"custom":["https://afdian.net/a/kejun","https://github.com/ModyQyW/sponsors","https://afdian.net/a/zguolee"]}},"created_at":"2023-10-24T07:50:18.000Z","updated_at":"2025-07-06T15:59:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f243a39a-00fe-49eb-b27d-2d666d4d7405","html_url":"https://github.com/uni-helper/localForage-adapter","commit_stats":null,"previous_names":["uni-helper/localforage-adapter"],"tags_count":56,"template":false,"template_full_name":"uni-helper/starter-ts","purl":"pkg:github/uni-helper/localForage-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2FlocalForage-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2FlocalForage-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2FlocalForage-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2FlocalForage-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uni-helper","download_url":"https://codeload.github.com/uni-helper/localForage-adapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2FlocalForage-adapter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266990998,"owners_count":24017732,"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-07-25T02:00:09.625Z","response_time":70,"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":["localforage","sqlite","sqlite-android","sqlite-ios","uniapp","unistorage"],"created_at":"2024-12-01T13:29:30.213Z","updated_at":"2025-07-25T10:33:11.339Z","avatar_url":"https://github.com/uni-helper.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ModyQyW","https://github.com/sponsors/KeJunMao","https://github.com/sponsors/Neil Lee","https://afdian.net/a/kejun","https://github.com/ModyQyW/sponsors","https://afdian.net/a/zguolee"],"categories":[],"sub_categories":[],"readme":"# @uni-helper/localforage-adapter\n\n[![NPM version](https://img.shields.io/npm/v/@uni-helper/localforage-adapter?color=a1b858\u0026label=)](https://www.npmjs.com/package/@uni-helper/localforage-adapter)\n\n## 安装\n\n```bash\n# pnpm\npnpm install @uni-helper/localforage-adapter\n# npm\nnpm install @uni-helper/localforage-adapter --save\n# yarn\nyarn add @uni-helper/localforage-adapter\n```\n\n## 使用\n\n- uniStorageDriver：使用uni-app内置的storage API，支持所有平台，但是性能较差，不建议在H5端和App端使用，仅建议小程序端使用\n- sqliteDriver：使用基座包提供的SQLite模块，仅支持App端，性能较好，建议在App端使用\n\n```js\nimport { uniStorageDriver, sqliteDriver } from \"@uni-helper/localforage-adapter\"\nimport localforage from \"localforage\"\n\nlocalforage.defineDriver(uniStorageDriver); // 全端支持，但是还是建议在H5端使用lf自带的IndexedDB\nlocalforage.defineDriver(sqliteDriver); // 仅支持APP端，并需要基座包支持SQLite模块\n// 可以使用 #ifdef 等UniAPP特有条件编译注释符\nlocalforage.setDriver([ //会按顺序依次尝试，直到找到可用的驱动\n  sqliteDriver._driver // 或者\"sqliteDriver\"\n  uniStorageDriver._driver // 或者\"uniStorageDriver\"\n]);\n```\n\n## License\n\n[MIT](./LICENSE) License \u0026copy; 2023-PRESENT [Uni-Helper](https://github.com/uni-helper)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-helper%2Flocalforage-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funi-helper%2Flocalforage-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-helper%2Flocalforage-adapter/lists"}