{"id":20596935,"url":"https://github.com/tradle/asyncstorage-down","last_synced_at":"2025-06-28T01:02:08.040Z","repository":{"id":30468778,"uuid":"34022769","full_name":"tradle/asyncstorage-down","owner":"tradle","description":"A leveldown API implementation that maps to AsyncStorage in React Native","archived":false,"fork":false,"pushed_at":"2022-05-04T19:10:34.000Z","size":65,"stargazers_count":81,"open_issues_count":4,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-11T13:55:41.167Z","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/tradle.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-15T22:57:42.000Z","updated_at":"2024-11-20T17:04:32.000Z","dependencies_parsed_at":"2022-08-20T01:00:40.518Z","dependency_job_id":null,"html_url":"https://github.com/tradle/asyncstorage-down","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/tradle/asyncstorage-down","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fasyncstorage-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fasyncstorage-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fasyncstorage-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fasyncstorage-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tradle","download_url":"https://codeload.github.com/tradle/asyncstorage-down/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fasyncstorage-down/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261296915,"owners_count":23137218,"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":[],"created_at":"2024-11-16T08:19:34.426Z","updated_at":"2025-06-28T01:02:07.719Z","avatar_url":"https://github.com/tradle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asyncstorage-down\n\n_borrows **very** heavily and gratefully from localstorage-down_\n\nImplementation of leveldown for React's AsyncStorage\n\nThe idea is to be able to use the level stack in React Native\n\nThis project is intended for use with the [level eco-system](https://github.com/level/).\n\n## Install\n\n```\nnpm install asyncstorage-down\n```\n\n## Example\n\nAt the command prompt in your chosen directory :\n\n```\nnpm install asyncstorage-down\nnpm install levelup\n```\n\nCreate a file called index.js and enter the following:\n\n```js\nimport asyncstorageDown from 'asyncstorage-down'\nimport levelup from 'levelup'\n// or whichever implementation you're using\nimport AsyncStorage from '@react-native-community/async-storage'\n\nconst db = levelup('/does/not/matter', {\n  db: location =\u003e asyncstorageDown(location, { AsyncStorage })\n})\n\ndb.put('name', 'Yuri Irsenovich Kim');\ndb.put('dob', '16 February 1941');\ndb.put('spouse', 'Kim Young-sook');\ndb.put('occupation', 'Clown');\n\ndb.readStream()\n   .on('data', function (data) {\n      if (typeof data.value !== 'undefined') {\n         console.log(data.key, '=', data.value);\n      }\n   })\n   .on('error', function (err) {\n      console.log('Oh my!', err);\n   })\n   .on('close', function () {\n      console.log('Stream closed');\n   })\n   .on('end', function () {\n     console.log('Stream ended');\n   });\n```\n\n## Note\n\nReact Native's packager currently doesn't automatically inject browserified core node modules, like util, crypto, process, buffer, etc. Currently this module depends on several shims to mitigate the sadness. The alternative is to use [react-native-webpack-server](https://www.npmjs.org/package/react-native-webpack-server), which allows you to use browserified node core modules out of the box. Once React Native's packager allows the same functionality, this module's dependencies can be heavily pruned.\n\n## Alternatives\n\nIf you're willing to add native modules to your project, you may also be interested in [`react-native-leveldown`](https://github.com/andymatuschak/react-native-leveldown), which implements native bindings to the original C++ implementation of LevelDB.\n\n## Related Projects\n\n- [react-native-async-storage-snappy](https://github.com/tradle/react-native-async-storage-snappy): SnappyDB-based AsyncStorage backend for Android\n- [react-native-async-storage-rocks](https://github.com/tradle/react-native-async-storage-rocks): RocksDB-based AsyncStorage backend for iOS\n\n## Contributors\n\nTradle, Inc. https://github.com/tradle\n\nMark Vayngrib https://github.com/mvayngrib\n\nEllen Katsnelson https://github.com/pgmemk\n\nAndre Staltz https://github.com/staltz\n\n## localstorage-down Contributors\n\nAnton Whalley https://github.com/no9\n\nAdam Shih https://github.com/adamshih\n\nNolan Lawson https://github.com/nolanlawson\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fasyncstorage-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftradle%2Fasyncstorage-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fasyncstorage-down/lists"}