{"id":29554407,"url":"https://github.com/joshsny/speedstore","last_synced_at":"2025-07-18T07:09:49.090Z","repository":{"id":122588928,"uuid":"363334432","full_name":"joshsny/SpeedStore","owner":"joshsny","description":"Blazingly fast Properties storage for Google Apps Script ⚡","archived":false,"fork":false,"pushed_at":"2023-05-10T20:17:56.000Z","size":4090,"stargazers_count":28,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-02T03:33:18.468Z","etag":null,"topics":["google-apps-script"],"latest_commit_sha":null,"homepage":"","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/joshsny.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":"2021-05-01T05:53:13.000Z","updated_at":"2024-11-01T15:03:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab364f4d-8f56-4d2a-aa1f-2750c97f7e1a","html_url":"https://github.com/joshsny/SpeedStore","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joshsny/SpeedStore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshsny%2FSpeedStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshsny%2FSpeedStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshsny%2FSpeedStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshsny%2FSpeedStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshsny","download_url":"https://codeload.github.com/joshsny/SpeedStore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshsny%2FSpeedStore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265716330,"owners_count":23816356,"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":["google-apps-script"],"created_at":"2025-07-18T07:09:48.424Z","updated_at":"2025-07-18T07:09:49.063Z","avatar_url":"https://github.com/joshsny.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/joshsny/SpeedStore\"\u003e\n    \u003cimg src=\"https://i.ibb.co/s6bBQFg/storage-512.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eSpeedStore\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    Blazingly fast Properties storage for Google Apps Script ⚡\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/joshsny/SpeedStore.svg?style=for-the-badge\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/joshsny/SpeedStore.svg?style=for-the-badge\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://script.google.com/d/1292oAlLR3zBW8f5XyI1RwTyX2kDFWCShwka_aRRhD43nyFPXB8EjA5r1/edit?usp=sharing\"\u003e\u003cb\u003eView Demo\u003c/b\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/joshsny/SpeedStore/issues\"\u003e\u003cb\u003eReport Bug\u003c/b\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003e\u003ch2 style=\"display: inline-block\"\u003eTable of Contents\u003c/h2\u003e\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-speedstore\"\u003eAbout SpeedStore\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#how-to-use-speedstore\"\u003eHow to use SpeedStore\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e --\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n\u003c!-- [![Product Name Screen Shot][product-screenshot]](https://ibb.co/jWbpGL8) --\u003e\n\nRetrieving and saving properties in Google Apps Script can be slow, especially if there are a lot of them.\n\nSpeedStore is a blazingly fast in memory properties store which you can use to make retrieving and saving properties much easier. It stores a copy of your Properties in memory to do the following:\n\n-   It only costs you for the first read (~50ms), subsequent reads are from memory rather than the store. This significantly speeds up scripts which read a lot of properties (e.g. Add-Ons).\n-   The store is chunked, allowing you to save/retrieve properties up to 500kb rather than only being able to store properties smaller than 9kb. Saving larger properties does not take longer than smaller ones, since everything is split into smaller chunks and is saved in one call to the store.\n-   It takes care of parsing objects for you, so you don't need to JSON serialize/parse them every time.\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nTo get started with SpeedStore all you need to do is add the library to your Apps Script project and you are good to go!\n\n```json\n{\n    \"dependencies\": {\n        \"libraries\": [\n            {\n                \"userSymbol\": \"SpeedStore\",\n                \"libraryId\": \"1t1E-r2T5Na3MwsE3DxRqV_2A9U5YWLXEPowWqc-dAUcoNJD0YaRgVs3D\",\n                \"version\": \"9\"\n            }\n        ]\n    }\n}\n```\n\n## Create your SpeedStore\n\nSpeedStore works best when it is used as a global variable. To do this, add the following in any file of your Google Apps Script project:\n\n```javascript\nlet store = SpeedStore.getStore({\n    store: PropertiesService.getUserProperties(),\n});\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## How to use SpeedStore\n\nUsing SpeedStore is simple.\n\n```javascript\n// Get data from the store\nstore.get(\"fruits\");\n\n// Set data in the store\nstore.set(\"fruits\", [\"Apple\", \"Orange\", \"Pinapple\"]);\n\n// Set multiple items at the same time\nstore.setMany({\n    fruits: [\"Apple\", \"Orange\", \"Pinapple\"],\n    vegetables: [\"Cucumber\", \"Avocado\"],\n    favourites: { fruit: \"Orange\", vegetable: \"Avocado\" },\n});\n\n// Check if something exists in the store\nstore.exists(\"fruits\");\n\n// Delete something from the store\nstore.delete(\"fruits\");\n\n// Remove everything from the store\nstore.deleteAll();\n```\n\n## Configuration\n\nWhen initializing the store you can pass it configuration options. The following options are available:\n\n-   `store`: This can be one of `PropertiesService.getScriptProperties()`, `PropertiesService.getUserProperties()` or `PropertiesService.getDocumentProperties()` depending on where you want things to be stored.\n-   `numChunks`: SpeedStore works by storing everything as one large JSON object and splitting it across multiple chunks to overcome the 9kb size limit for properties in Google Apps Script. This option determines the number of chunks the store will be split into.\n-   `prefix`: Chunks of your SpeedStore are stored at a prefix so they don't conflict with other values.\n-   `applyCompression`: Since SpeedStore is focused on speed, it does not compress the store by default. If you need to store very large values (over the 500kb total limit for Properties stores) setting this to true will allow you to store 2-5x the amount of data, depending on how compressible it is.\n-   `encode`: The function used to encode the store.\n-   `decode`: The function used to decode the store.\n\nHere is an example with the default configuration for each setting:\n\n```javascript\nlet store = SpeedStore.getStore({\n    store: PropertiesService.getUserProperties(), // store is required and does not have a default value\n    numChunks: 50,\n    prefix: \"speedstore_\",\n    applyCompression: false,\n    encode: JSON.stringify,\n    decode: JSON.parse,\n});\n```\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nJoshua Snyder - [@joshsny](https://twitter.com/joshsny) - [LinkedIn](https://linkedin.com/in/joshsny)\n\nProject Link: [https://github.com/joshsny/SpeedStore](https://github.com/joshsny/SpeedStore)\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n\n## Acknowledgements\n\n-   [LZipper - Used for compression](https://github.com/blindman67/LZipper)\n-   Icon by \u003ca href=\"https://freeicons.io/profile/823\"\u003eMuhammad Haq\u003c/a\u003e on \u003ca href=\"https://freeicons.io\"\u003efreeicons.io\u003c/a\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/joshsny/SpeedStore.svg?style=for-the-badge\n[contributors-url]: https://github.com/joshsny/SpeedStore/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/joshsny/SpeedStore.svg?style=for-the-badge\n[forks-url]: https://github.com/joshsny/SpeedStore/network/members\n[stars-shield]: https://img.shields.io/github/stars/joshsny/SpeedStore.svg?style=for-the-badge\n[stars-url]: https://github.com/joshsny/SpeedStore/stargazers\n[issues-shield]: https://img.shields.io/github/issues/joshsny/SpeedStore.svg?style=for-the-badge\n[issues-url]: https://github.com/joshsny/SpeedStore/issues\n[license-shield]: https://img.shields.io/github/license/joshsny/SpeedStore.svg?style=for-the-badge\n[license-url]: https://github.com/joshsny/SpeedStore/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/joshsny\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshsny%2Fspeedstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshsny%2Fspeedstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshsny%2Fspeedstore/lists"}