{"id":27742623,"url":"https://github.com/dinoscapeprogramming/pantryjs","last_synced_at":"2025-04-28T16:44:30.080Z","repository":{"id":289461348,"uuid":"971336043","full_name":"DinoscapeProgramming/PantryJS","owner":"DinoscapeProgramming","description":"A better SDK for interacting with Pantry, with dynamic updates.","archived":false,"fork":false,"pushed_at":"2025-04-23T12:02:42.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T12:24:11.146Z","etag":null,"topics":[],"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/DinoscapeProgramming.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,"zenodo":null}},"created_at":"2025-04-23T11:18:37.000Z","updated_at":"2025-04-23T12:02:46.000Z","dependencies_parsed_at":"2025-04-23T12:34:17.331Z","dependency_job_id":null,"html_url":"https://github.com/DinoscapeProgramming/PantryJS","commit_stats":null,"previous_names":["dinoscapeprogramming/pantryjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FPantryJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FPantryJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FPantryJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FPantryJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DinoscapeProgramming","download_url":"https://codeload.github.com/DinoscapeProgramming/PantryJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251347903,"owners_count":21575176,"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":[],"created_at":"2025-04-28T16:44:29.469Z","updated_at":"2025-04-28T16:44:30.069Z","avatar_url":"https://github.com/DinoscapeProgramming.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PantryJS\r\n\r\n**PantryJS** is a simple and powerful SDK for managing and syncing baskets in a pantry. It provides easy access to baskets, automatic synchronization with the Pantry service, and allows developers to manage data in a clean and intuitive way.\r\n\r\n## Installation\r\n\r\nTo install **PantryJS**, use npm:\r\n\r\n```bash\r\nnpm install pantry.js\r\n```\r\n\r\n## Usage\r\n\r\n### Initialize Pantry SDK\r\n\r\n```javascript\r\nconst PantrySDK = require('pantry.js');\r\n\r\nconst pantry = new PantrySDK('your-pantry-id');  // Initialize with Pantry ID\r\n```\r\n\r\n### Access and Modify a Basket\r\n\r\n```javascript\r\n// Access a basket (e.g., 'store')\r\nasync function useBasket() {\r\n  const store = await pantry.store;  // Access the basket named 'store'\r\n\r\n  // Modify the basket (this will automatically trigger an update to Pantry)\r\n  store.someKey = 'newValue';  // Automatically triggers an update to Pantry!\r\n\r\n  console.log(store);  // Output the store data\r\n\r\n  // Access another basket (e.g., 'cart')\r\n  const cart = await pantry.cart;  // Dynamically fetch the basket named 'cart'\r\n  console.log(cart);\r\n}\r\n\r\nuseBasket().catch(console.error);\r\n```\r\n\r\n## Features\r\n\r\n- **Auto-sync**: When you modify basket data, it automatically syncs with the Pantry service.\r\n- **Lazy Loading**: Baskets are fetched and initialized only when accessed for the first time.\r\n- **Dynamic Basket Access**: Access baskets directly using `pantry.store`, `pantry.cart`, etc., without explicit function calls.\r\n\r\n## License\r\n\r\nMIT License. See LICENSE file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoscapeprogramming%2Fpantryjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinoscapeprogramming%2Fpantryjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoscapeprogramming%2Fpantryjs/lists"}