{"id":16239610,"url":"https://github.com/mirinzhang/react-native-expire-storage","last_synced_at":"2025-03-19T16:31:29.415Z","repository":{"id":57336860,"uuid":"153791540","full_name":"mirinzhang/react-native-expire-storage","owner":"mirinzhang","description":"Use react-native AsyncStorage storage data by add expiration time","archived":false,"fork":false,"pushed_at":"2020-06-25T05:55:25.000Z","size":8,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T23:15:38.148Z","etag":null,"topics":["asyncstorage","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirinzhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-19T14:00:05.000Z","updated_at":"2023-10-12T00:38:16.000Z","dependencies_parsed_at":"2022-09-12T11:02:36.630Z","dependency_job_id":null,"html_url":"https://github.com/mirinzhang/react-native-expire-storage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirinzhang%2Freact-native-expire-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirinzhang%2Freact-native-expire-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirinzhang%2Freact-native-expire-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirinzhang%2Freact-native-expire-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirinzhang","download_url":"https://codeload.github.com/mirinzhang/react-native-expire-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006260,"owners_count":20382441,"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":["asyncstorage","react-native"],"created_at":"2024-10-10T13:44:21.121Z","updated_at":"2025-03-19T16:31:29.117Z","avatar_url":"https://github.com/mirinzhang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-expire-storage\n\nUse react-native AsyncStorage storage data by add expiration time\n\n### Install\n\n```bash\nnpm i -S react-native-expire-storage\n```\n\n### Usage\n\n```javascript\nimport Storage from 'react-native-expire-storage';\n\n// setItem\n/**\n * Set storage\n * @param {string} key storage key\n * @param {any} value storage data\n * @param {number} expire expiration time(second)\n */\nStorage.setItem('key1', {data: {name: 'tom', age: 12}, id: 0, str: 'key1 data'}, 60 * 60);\n\nStorage.getItem('key1'); // {data: {name: 'tom', age: 12}, id: 0, str: 'key1 data'}\n\nStorage.mergeItem('key1', {{data: {age: 13}, str: 'key1 data changed'}});\n\nStorage.getItem('key1'); // {data: {name: 'tom', age: 13}, id: 0, str: 'key1 data changed'}\n\nStorage.getAllKeys(); // ['key1']\n\nStorage.removeItem();\n\n// Storage.clear() // clear all storage data\n\nStorage.getItem('key1'); // null\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirinzhang%2Freact-native-expire-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirinzhang%2Freact-native-expire-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirinzhang%2Freact-native-expire-storage/lists"}