{"id":15697698,"url":"https://github.com/kt3k/lepont-async-storage","last_synced_at":"2025-05-12T20:45:09.742Z","repository":{"id":42885069,"uuid":"249598110","full_name":"kt3k/lepont-async-storage","owner":"kt3k","description":"Use react-native's AsyncStorage in browser, a lepont plugin","archived":false,"fork":false,"pushed_at":"2024-06-18T04:22:54.000Z","size":620,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T09:11:26.668Z","etag":null,"topics":["async-storage","lepont","react-native","webview"],"latest_commit_sha":null,"homepage":"","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/kt3k.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-03-24T02:54:26.000Z","updated_at":"2024-06-18T04:22:57.000Z","dependencies_parsed_at":"2023-02-05T18:01:59.788Z","dependency_job_id":"aabcbbd5-65dd-4eed-a2a5-30b953c6071e","html_url":"https://github.com/kt3k/lepont-async-storage","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":0.26,"last_synced_commit":"dc6819df714705a5b13b6e71d6b48f88eb08faeb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Flepont-async-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Flepont-async-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Flepont-async-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Flepont-async-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/lepont-async-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246574865,"owners_count":20799225,"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":["async-storage","lepont","react-native","webview"],"created_at":"2024-10-03T19:21:10.026Z","updated_at":"2025-04-01T10:31:50.508Z","avatar_url":"https://github.com/kt3k.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @lepont/async-storage v0.4.2\n\n![ci](https://github.com/kt3k/lepont-async-storage/workflows/ci/badge.svg)\n[![codecov](https://codecov.io/gh/kt3k/lepont-async-storage/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/lepont-async-storage)\n\n\u003e Async Storage Bridge for [lepont][]\n\nYou can use [AsyncStorage][] through [lepont][].\n\n# Install\n\n```\nnpm i --save lepont @react-native-community/async-storage @lepont/async-storage\n```\n\n# Usage\n\nReact Native side:\n\n```tsx\nimport React from 'react'\nimport { useBridge } from 'lepont'\nimport { WebView } from 'react-native-webview'\nimport { AsyncStorageBridge } from '@lepont/async-storage/bridge'\nimport AsyncStorage from '@react-native-community/async-storage'\n\nconst App = () =\u003e {\n  const [ref, onMessage] = useRegistry(AsyncStorageBridge(AsyncStorage))\n\n  return (\n    \u003cWebView\n      source={{ uri: 'Web.bundle/index.html' }}\n      javaScriptEnabled={true}\n      ref={ref}\n      onMessage={onMessage}\n    /\u003e\n  )\n}\n```\n\nBrowser side:\n\n```ts\nimport { setItem, getItem } from '@lepont/async-storage'\n\nawait setItem('@storage_Key', { my: 'value' })\nawait getItem('@storage_Key') // =\u003e { my: 'value' }\n```\n\n# LICENSE\n\nMIT\n\n[lepont]: https://github.com/kt3k/lepont\n[AsyncStorage]: https://github.com/react-native-community/async-storage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Flepont-async-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Flepont-async-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Flepont-async-storage/lists"}