{"id":19639906,"url":"https://github.com/chaysen/chrome-storage-ts-utility","last_synced_at":"2026-01-20T06:05:20.288Z","repository":{"id":197035918,"uuid":"697886577","full_name":"Chaysen/chrome-storage-ts-utility","owner":"Chaysen","description":"A TypeScript utility for interacting with Chrome's local storage.","archived":false,"fork":false,"pushed_at":"2024-08-09T13:37:04.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T14:51:09.217Z","etag":null,"topics":["chrome-extension","chrome-storage","chrome-storage-api","local-storage","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/chrome-storegae-ts","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/Chaysen.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":"2023-09-28T17:13:52.000Z","updated_at":"2024-08-09T13:37:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4ea411e-d489-4dcc-922e-085edf4196be","html_url":"https://github.com/Chaysen/chrome-storage-ts-utility","commit_stats":null,"previous_names":["chaysen/chrome-storage-ts-utility"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaysen%2Fchrome-storage-ts-utility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaysen%2Fchrome-storage-ts-utility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaysen%2Fchrome-storage-ts-utility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaysen%2Fchrome-storage-ts-utility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chaysen","download_url":"https://codeload.github.com/Chaysen/chrome-storage-ts-utility/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247900952,"owners_count":21015166,"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":["chrome-extension","chrome-storage","chrome-storage-api","local-storage","typescript"],"created_at":"2024-11-11T14:03:42.514Z","updated_at":"2026-01-20T06:05:20.270Z","avatar_url":"https://github.com/Chaysen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChromeStorageTS\n[![Node.js CI](https://github.com/Chaysen/chrome-storage-ts-utility/actions/workflows/nodejs.yml/badge.svg?branch=main\u0026event=push)](https://github.com/Chaysen/chrome-storage-ts-utility/actions/workflows/nodejs.yml)\n[![npm version](https://badge.fury.io/js/chrome-storegae-ts.svg)](https://badge.fury.io/js/chrome-storegae-ts)\n\nA TypeScript utility for interacting with Chrome's local storage in a type-safe manner.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API](#api)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install chrome-storage-ts --save\n```\n## Usage \n\n```typescript\nimport { ChromeStorageTS } from 'chrome-storage-ts';\n\nconst initialStorage = {\n  key1: 'value1',\n  key2: 'value2',\n};\n\nconst storageInstance = new ChromeStorageTS(initialStorage, 'local'); // 'local' is the default storage type\n\n// Update a key in the storage\nstorageInstance.updateStorageKeyValue('key1', 'newValue');\n\n// ... other operations\n```\n## API\n### ChromeStorageTS\n- **constructor(storage: ChromeStorageObject, storageType: StorageTypes = 'local')**\nInitializes the storage instance with the provided storage object and specifies the type of \n\n- **resetChromeStorage(): Promise\u003cvoid\u003e**\nResets the Chrome storage to its initial state by setting all keys to undefined.\n\n- **updateStorageKeyValue(setting: string, value: any): Promise\u003cvoid\u003e**\nUpdates a specific key in the Chrome storage with the provided value.\n\n- **getStorageKeyValue(key: string, cb: Function): Promise\u003cvoid\u003e**\nRetrieves the value associated with a specific key from the Chrome storage.\n\n- **getStorageKeysValue(keys: Array\u003cstring\u003e, cb: Function): Promise\u003cvoid\u003e**\nRetrieves the values associated with multiple keys from the Chrome storage.\n\n- **addListenerChromeStorageValue(key: string, cb: Function): Promise\u003cvoid\u003e**\nAdds a listener to detect changes to a specific key in the Chrome storage.\n\n- **addListenerChromeStorageValues(keys: Array\u003cstring\u003e, cb: Function): Promise\u003cvoid\u003e**\nAdds a listener to detect changes to multiple keys in the Chrome storage.\n\n## Contributing\n- Fork the repository.\n- Create your feature branch (git checkout -b feature/YourFeature).\n- Commit your changes (git commit -am 'Add some feature').\n- Push to the branch (git push origin feature/YourFeature).\n- Open a pull request.\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaysen%2Fchrome-storage-ts-utility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaysen%2Fchrome-storage-ts-utility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaysen%2Fchrome-storage-ts-utility/lists"}