{"_id":"@cachehorse/cached-fetch","_rev":"2-0adf56aa8bebc148c7fd34d3a1ee7e3d","name":"@cachehorse/cached-fetch","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@cachehorse/cached-fetch","version":"0.0.1","keywords":["fetch","api","cache","batched","http"],"author":{"name":"fiiv","email":"git@fiiv.io"},"license":"MIT","_id":"@cachehorse/cached-fetch@0.0.1","maintainers":[{"name":"mtimofiiv","email":"npm@fiiv.io"}],"homepage":"https://github.com/cachehorse/cached-fetch#readme","bugs":{"url":"https://github.com/cachehorse/cached-fetch/issues"},"dist":{"shasum":"9b4e114dfa23b0d3be09d9a5c544aa9fa5aeefae","tarball":"https://registry.npmjs.org/@cachehorse/cached-fetch/-/cached-fetch-0.0.1.tgz","fileCount":6,"integrity":"sha512-MnqqDhXyhwwHyXzvn2LSGCPaW1loLBDlk3Nj2b19cDfBQ3lKQoc+Zm3sEkHtIYRh9yjRtQS4HQgqecuiUQQvow==","signatures":[{"sig":"MEQCIA+9GAbGObZpXyC6NIiHRL9tE8Sd6jcaNZYntX6T/gdxAiBomrnLLy4EjJWbXFYQ8tV32gz1S+G/NMIURxQO4QglZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4940},"main":"lib/index.js","unpkg":"dist/cached-fetch-fetch.min.js","browser":"dist/cached-fetch-fetch.min.js","gitHead":"645eb9cc06bad6de3498d5d20c0b8d3e598716b9","scripts":{"test":"node test/index.js","build":"rollup -c"},"_npmUser":{"name":"mtimofiiv","email":"npm@fiiv.io"},"repository":{"url":"git+ssh://git@github.com/cachehorse/cached-fetch.git","type":"git"},"_npmVersion":"10.9.0","description":"A wrapper around fetch() allowing you to cache all your requests and adding the ability to batch multiple requests.","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^2.79.2","@rollup/plugin-terser":"^0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/cached-fetch_0.0.1_1749009206828_0.8668309880347145","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@cachehorse/cached-fetch","version":"1.0.0","description":"A wrapper around fetch() allowing you to cache all your requests and adding the ability to batch multiple requests.","main":"lib/index.js","browser":"dist/cached-fetch-fetch.min.js","unpkg":"dist/cached-fetch-fetch.min.js","scripts":{"build":"rollup -c","test":"node test/index.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/cachehorse/cached-fetch.git"},"keywords":["fetch","api","cache","batched","http"],"author":{"name":"fiiv","email":"git@fiiv.io"},"license":"MIT","bugs":{"url":"https://github.com/cachehorse/cached-fetch/issues"},"homepage":"https://cache.horse","devDependencies":{"@rollup/plugin-terser":"^0.4.4","rollup":"^2.79.2"},"_id":"@cachehorse/cached-fetch@1.0.0","gitHead":"b83343b3a1029488c7a2d6829cf53f88caa4b17a","_nodeVersion":"21.5.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-1DGNuxhFMjh8StWgcUI+A6uxAEoSzioNvIZXh3iTfPAhpkpqmPmnogHIyuoX+mo41pmxJZ9O7DUWN6Q4yWPc8A==","shasum":"3e8eb192b1f9ec9c4f4158fc46068594146ebbb9","tarball":"https://registry.npmjs.org/@cachehorse/cached-fetch/-/cached-fetch-1.0.0.tgz","fileCount":7,"unpackedSize":5983,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCoFqetOx5ksrKvRt0+dZE3w548g8mlOQpaPgufKFvp2wIgWHJbFi45NH0w4MSQbYXyNj0pJqKe0c+7GsiAcg3/dCU="}]},"_npmUser":{"name":"mtimofiiv","email":"npm@fiiv.io"},"directories":{},"maintainers":[{"name":"mtimofiiv","email":"npm@fiiv.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cached-fetch_1.0.0_1749010432575_0.5021333081658637"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-04T03:53:26.762Z","modified":"2025-06-04T04:13:52.939Z","0.0.1":"2025-06-04T03:53:27.095Z","1.0.0":"2025-06-04T04:13:52.764Z"},"bugs":{"url":"https://github.com/cachehorse/cached-fetch/issues"},"author":{"name":"fiiv","email":"git@fiiv.io"},"license":"MIT","homepage":"https://cache.horse","keywords":["fetch","api","cache","batched","http"],"repository":{"type":"git","url":"git+ssh://git@github.com/cachehorse/cached-fetch.git"},"description":"A wrapper around fetch() allowing you to cache all your requests and adding the ability to batch multiple requests.","maintainers":[{"name":"mtimofiiv","email":"npm@fiiv.io"}],"readme":"# [`@cachehorse`](https://cache.horse) / [`cached-fetch`](https://github.com/cachehorse/cached-fetch)\n\nThis package is a small wrapper around `fetch()`, allowing you to utilise [Cache Horse](https://cache.horse)'s caching and batching API.\n\n## How to use\n\nInstalling:\n\n```bash\nnpm install --save @cachehorse/cached-fetch\n```\n\n```js\nimport CachedFetch from '@cachehorse/cached-fetch'\n\nconst { get } = CachedFetch({ apiKey: '<your-api-key>' })\n\nconst URLS = [\n  'https://dummyjson.com/http/200',\n  'https://dummyjson.com/test'\n]\n\nconst getOneEndpoint = async () => {\n  const request = await get('https://dummyjson.com/http/200')\n  return request.json()\n}\n\nconst getMultipleEndpoints = async () => {\n  const request = await get(['https://dummyjson.com/http/200', 'https://dummyjson.com/test'])\n  return request.json()\n}\n\ngetOneEndpoint()\ngetMultipleEndpoints()\n```\n","readmeFilename":"README.md"}