{"id":13475275,"url":"https://github.com/choojs/persist-storage","last_synced_at":"2025-07-28T00:06:02.408Z","repository":{"id":57322320,"uuid":"106982292","full_name":"choojs/persist-storage","owner":"choojs","description":"🗄 - Enable persistent storage in the browser","archived":false,"fork":false,"pushed_at":"2017-10-18T11:36:15.000Z","size":12,"stargazers_count":18,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T03:10:40.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/choojs.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-10-15T04:01:09.000Z","updated_at":"2025-02-11T15:49:45.000Z","dependencies_parsed_at":"2022-08-25T22:41:30.879Z","dependency_job_id":null,"html_url":"https://github.com/choojs/persist-storage","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/choojs/persist-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fpersist-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fpersist-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fpersist-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fpersist-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choojs","download_url":"https://codeload.github.com/choojs/persist-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fpersist-storage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267442456,"owners_count":24087802,"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-27T02:00:11.917Z","response_time":82,"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":[],"created_at":"2024-07-31T16:01:18.972Z","updated_at":"2025-07-28T00:06:02.343Z","avatar_url":"https://github.com/choojs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# persist-storage\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nEnable persistent storage in the browser.\n\nBy default storage such as `indexedDB` can be cleared when a device starts\nrunning out of space. This module is a thin wrapper around the [`StorageManager\nAPI`](http://devdocs.io/dom/storagemanager), checking if persistent storage is\nenabled — and enabling it if it isn't enabled yet, and able to enable it.\n\n## Usage\n```js\nvar persist = require('persist-storage')\n\npersist(function (success) {\n  if (success) {\n    console.log('Storage will not be cleared except by explicit user action')\n  } else {\n    console.log('Storage may be cleared by the UA under storage pressure.')\n  }\n})\n```\n\n## API\n### `persist(callback(ok))`\nEnable persistent storage. Calls a callback with a boolean that's `true` for\nsuccess and `false` for failure to enable it.\n\n## License\n[Apache-2.0](./LICENSE)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/persist-storage.svg?style=flat-square\n[3]: https://npmjs.org/package/persist-storage\n[4]: https://img.shields.io/travis/choojs/persist-storage/master.svg?style=flat-square\n[5]: https://travis-ci.org/choojs/persist-storage\n[6]: https://img.shields.io/codecov/c/github/choojs/persist-storage/master.svg?style=flat-square\n[7]: https://codecov.io/github/choojs/persist-storage\n[8]: http://img.shields.io/npm/dm/persist-storage.svg?style=flat-square\n[9]: https://npmjs.org/package/persist-storage\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fpersist-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoojs%2Fpersist-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fpersist-storage/lists"}