{"id":30060276,"url":"https://github.com/tiaanduplessis/react-native-modest-storage","last_synced_at":"2025-08-08T01:43:13.229Z","repository":{"id":18125087,"uuid":"83435033","full_name":"tiaanduplessis/react-native-modest-storage","owner":"tiaanduplessis","description":"💾  A modest wrapper around the AsyncStorage API","archived":false,"fork":false,"pushed_at":"2023-01-26T05:58:11.000Z","size":1929,"stargazers_count":22,"open_issues_count":6,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-24T20:16:21.685Z","etag":null,"topics":["asyncstorage","asyncstorage-wrapper","modest","react-native"],"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/tiaanduplessis.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":"2017-02-28T13:21:56.000Z","updated_at":"2022-05-30T09:43:47.000Z","dependencies_parsed_at":"2023-02-14T14:46:07.645Z","dependency_job_id":null,"html_url":"https://github.com/tiaanduplessis/react-native-modest-storage","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tiaanduplessis/react-native-modest-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Freact-native-modest-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Freact-native-modest-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Freact-native-modest-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Freact-native-modest-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiaanduplessis","download_url":"https://codeload.github.com/tiaanduplessis/react-native-modest-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Freact-native-modest-storage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269352269,"owners_count":24402672,"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-07T02:00:09.698Z","response_time":73,"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":["asyncstorage","asyncstorage-wrapper","modest","react-native"],"created_at":"2025-08-08T01:43:05.759Z","updated_at":"2025-08-08T01:43:13.193Z","avatar_url":"https://github.com/tiaanduplessis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💾 react-native-modest-storage 💾\n\n[![package version](https://img.shields.io/npm/v/react-native-modest-storage.svg?style=flat-square)](https://npmjs.org/package/react-native-modest-storage)\n[![package downloads](https://img.shields.io/npm/dm/react-native-modest-storage.svg?style=flat-square)](https://npmjs.org/package/react-native-modest-storage)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![package license](https://img.shields.io/npm/l/react-native-modest-storage.svg?style=flat-square)](https://npmjs.org/package/react-native-modest-storage)\n[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\u003e A modest wrapper around the AsyncStorage API\n\n## Table of Contents\n\n-   [About](#about)\n-   [Install](#install)\n-   [Usage](#usage)\n-   [API](#api)\n-   [Contribute](#contribute)\n-   [License](#License)\n\n## About\n\nThis module is just a modest wrapper around [React Native](https://facebook.github.io/react-native/)'s [AsyncStorage](https://facebook.github.io/react-native/docs/asyncstorage.html) API. It's purpose is to provide a cleaner API for persisting data.\n\n## Install\n\nThis project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com). \n\n```sh\n$ npm install react-native-modest-storage\n$ # OR\n$ yarn add react-native-modest-storage\n```\n\n## Usage\n\n```js\nimport storage from 'react-native-modest-storage'\n\nasync function doStuff() {\n  await storage.set('aKey', { Hello: 'World'})\n  await storage.set('otherKey', 5)\n  await storage.get('aKey').then(console.log) // {Hello: \"World\"}\n  await storage.keys().then(console.log) // ['otherKey', 'aKey']\n  await storage.update('aKey', {Hello: 'is it me your looking for.'})\n  await storage.get('aKey').then(console.log) // {Hello: \"is it me your looking for.\"}\n  await storage.remove('otherKey')\n  await storage.get('otherKey').then(console.log) // null\n  await storage.set([['key1', {foo: 'bar'}], ['key2', 'baz'], ['test', {obj: 9}]])\n  await storage.get('key1').then(console.log) // {foo: \"bar\"}\n  await storage.get('test').then(console.log)\n  await storage.clear()\n}\n\ndoStuff()\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [get](#get)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [set](#set)\n    -   [Parameters](#parameters-1)\n-   [update](#update)\n    -   [Parameters](#parameters-2)\n-   [remove](#remove)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-1)\n-   [clear](#clear)\n-   [keys](#keys)\n\n### get\n\nRetreive value from AsyncStorage based on key.\nWrapper around getItem \u0026 multiGet.\n\n#### Parameters\n\n-   `key`  \n-   `def` **Any** Default value\n\n#### Examples\n\n```javascript\nstorage.get('foo').then(console.log).catch(console.error)\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** value of key\n\n### set\n\nPersist a value to AsyncStorage.\nWrapper around setItem \u0026 multiSet.\n\n#### Parameters\n\n-   `key`  \n-   `value` **Any** to persist\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** \n\n### update\n\nUpdate key with value by merging.\nWrapper around mergeItem \u0026 multiMerge.\n\n#### Parameters\n\n-   `key`  \n-   `value` **any** to update\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** \n\n### remove\n\nRemove a key from AsyncStorage.\nWrapper around removeItem \u0026 multiRemove.\n\n#### Parameters\n\n-   `key`  \n\n#### Examples\n\n```javascript\nstorage.remove(key).then(console.log).catch(console.error)\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** \n\n### clear\n\nErase all AsyncStorage data.\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** \n\n### keys\n\nRetreive all the keys stored in AsyncStorage of application.\nWrapper around getAllKeys\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** \n\n## Contribute\n\n1.  Fork it and create your feature branch: git checkout -b my-new-feature\n2.  Commit your changes: git commit -am 'Add some feature'\n3.  Push to the branch: git push origin my-new-feature \n4.  Submit a pull request\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Freact-native-modest-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiaanduplessis%2Freact-native-modest-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Freact-native-modest-storage/lists"}